<form method="post" action="information.php">
Email<input type="email" name="email">
<br>
Password<input type="password" name="password">
<br>
<input type="submit" value="Send Info">
</form>
<?php
$server="localhost";
$user="root";
$password="";
$database="mydata";
$con=mysql_connect($server,$user,$password);
if(!$con)
{
echo "<h1>Not Connection</h1>";
}
else
{
echo "<h1>Sever Connected</h1>";
}
$db=mysql_select_db($database,$con);
if(!$db)
{
echo "<h1>No Database</h1>";
}
else
{
echo "<h1>Database Connected </h1>";
}
$email=$_POST["email"];
$password=$_POST["password"];
echo $email . $password;
?>
Email<input type="email" name="email">
<br>
Password<input type="password" name="password">
<br>
<input type="submit" value="Send Info">
</form>
<?php
$server="localhost";
$user="root";
$password="";
$database="mydata";
$con=mysql_connect($server,$user,$password);
if(!$con)
{
echo "<h1>Not Connection</h1>";
}
else
{
echo "<h1>Sever Connected</h1>";
}
$db=mysql_select_db($database,$con);
if(!$db)
{
echo "<h1>No Database</h1>";
}
else
{
echo "<h1>Database Connected </h1>";
}
$email=$_POST["email"];
$password=$_POST["password"];
echo $email . $password;
?>
No comments:
Post a Comment