我正在编写一个用于登录的验证系统,直到我做这个
<?php
include('connect.php');
$Nome = stripslashes(mysql_real_escape_string($_POST['Nick']));
$Pass = stripslashes(mysql_real_escape_string($_POST['pass']));
$Query = mysql_query("SELECT * FROM table WHERE utenti='.$Nome.' AND password='.$Pass.'");
if(mysql_num_rows($Query)==1) {
session_register("$Nome");
header("Location:chat.php");
}
else {
echo "<b>Username or password incorrect!</b>";
}
?>
当我运行脚本并尝试登录时说“用户名或密码不正确”为什么?