我试图通过登录页面将登录用户名传递到仪表板,以便通过SQL查询显示名字和姓氏。我的用户名变量是空的,我无法弄清楚原因。任何帮助都会很精彩。
Login-submit.php页面!
if ($count){
$_SESSION['username'] = $username;// $_SESSION['loggedin'] = true or false would work too
$_SESSION['password'] = $password; // Why store the password in session data?
$user= $_SESSION['username']
header("Location: pageMLC_Dashboard.php");
exit();
}else{
$message="InvalidLogin";
header("Location: pageMLC.php?message");
exit();
}
if ($count){
$_SESSION['username'] = $username;// $_SESSION['loggedin'] = true or false would work too
$_SESSION['password'] = $password; // Why store the password in session data?
$user= $_SESSION['username']
header("Location: pageMLC_Dashboard.php");
exit();
}else{
$message="InvalidLogin";
header("Location: pageMLC.php?message");
exit();
}
信息中心页面