Php会话不起作用......任何人都可以告诉我我做错了什么。
if (crypt($_POST["password"], $row["password"]) == $row["password"])
{
// remember that user's now logged in by storing user's ID in session
$_SESSION["id"] = $row["email"];
$_SESSION["firstname"] = $row["firstname"];
echo json_encode(array('auth' => 'true'));
}
else{
echo json_encode(array('auth' => 'false', 'error' => 'Invalid Username or Password'));
}