下面是php代码。它将表单中的数据与数据库值进行比较。
但是,当我单击登录按钮时,它什么也没做?
mysql_connect($host, $databaseUsername, $databasePassword) or die(mysql_error());
mysql_select_db("login") or die(mysql_error());;
$uname = $_POST['inputEmail'];
$pword = $_POST['inputPassword'];
$result = mysql_query("SELECT * FROM login
WHERE Usernames='$uname' AND Passowrds='$pword'");
if ($row = mysql_fetch_array($result))
{
echo "correct login information";
} else {
echo "wrong login information";
}
?>