Hello,
Not sure where I am going wrong with this. When I run it, I get a blank page or if I have Friendly Error messages turned on I get a 500 Internal Server error.
Any help is tremendously welcomed!
PHP Code:<?php
$conn=odbc_connect('Warranty','','');
if (!$conn)
{exit("Connection Failed: " . $conn);}
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
$sql="SELECT * FROM Admins WHERE Username='$myusername' and Password='$mypassword'";
$results= odbc_execute($sql);
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
// Register $myusername, $mypassword and redirect to file "AdminPage.php"
session_register("myusername");
session_register("mypassword");
header("location:AdminPage.php");
}
else {
echo "Wrong Username or Password";
}
?>

