if(isset($_POST["email"]))
{
$email = mysql_real_escape_string($_POST["email"]); /* Line 10 */
$password = mysql_real_escape_string($_POST["password"]);
$result = mysql_query("SELECT password, id FROM users WHERE email = $email ");
if (!$result)
{
die( Invalid query: . mysql_error());
}
$row = mysql_fetch_assoc($result);
if($row[ password ] == $password)
{
ini_set("session.cookie_lifetime","360000");
session_start();
$_SESSION[ valid_user ] = $row[ id ];
$_SESSION[ email ] = $row[ email ];
mysql_close($link);
header( Location: index.php );
}
mysql_close($link);
}
I m不设任何员额,但指出$email
没有在第10条下定义。 为什么? http://www.easyphp.org/“rel=“nofollow” 方便PHP。
Notice: Undefined index: email in C:Program FilesEasyPHP-5.3.5.0wwwv0.3modellogin.php on line 10