[php]
Jotorres Login Form <?php function Update(){ // Grab User submitted information $UserName = $_POST["UserName"]; $Password = $_POST["Password"];// Connect to the database
$con = mysql_connect(“localhost”,“root”);
// Make sure we connected succesfully
if(! $con)
{
die(‘Connection Failed’.mysql_error());
}
// Select the database to use
mysql_select_db(“first”,$con);
$result = mysql_query(“SELECT UserName,Password FROM login WHERE UserName=@UserName AND Password=@Password”);
$row = mysql_fetch_array($result);
if($row[“UserName”]==$UserName && $row[“Password”]==$Password){
echo “You are a validated user.”;}
else{
echo “Sorry, your credentials are not valid, Please try again.”;}
}
?>
UserName | |
Password | |