if (mysqli_num_rows($result) == 1) {
$_SESSION['id'] = $id;
$_SESSION['success'] = "You are now logged in";
header('location: index.php');
}else {
array_push($errors, "Wrong username/password combination");
}
}
请帮助我,我该如何回应我的会话是否正常工作以及会话如何工作。
答案 0 :(得分:-3)
switch (session_status())
{
case PHP_SESSION_NONE|1: echo 'NONE';
session_start ([$_SESSION['id'] = 25, $_SESSION['success'] = "You are now logged in"]);
break;
case PHP_SESSION_ACTIVE|2: echo 'ACTIVE';
if(isset(~)) {~}
break;
}