看板 PHP 關於我們 聯絡資訊
以下是我在checksession.php裡的一段php語法 用來檢查使用者登入的帳號跟密碼是否正確 然後再存入session中以便之後的網頁利用 但是最近發生只記錄到密碼而帳號卻紀錄不到的情況0.0 (不知道是不是我改了哪些東西 之前是都有記錄到的) 網頁的開頭已經有session_start().. <?php $user = new User(); $_user_id = $_POST['userid']; $password = $_POST['pwd']; //$_SESSION['USERID'] = $_user_id; //$_SESSION['USERPASSWORD'] = $password; $result = $user->login($_user_id, $password); if ($result == 0) { $_SESSION['USERID'] = $_user_id; $_SESSION['USERPASSWORD'] = $password; //echo $_user_id." "; //echo $password; //header("Location: ".ERP_ROOT_URL."member/bidList.php"); include("bidList.php"); } else { if ($result == 1) { echo "<script>alert('無此會員帳號!')</script>"; } else { echo "<script>alert('登入密碼不正確!')</script>"; } echo "<script>history.go(-1)</script>"; //include(ERP_ROOT_PATH."index.php"); } ?> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.217.226.59