我已經創建了一個登錄頁面,在用戶通過驗證後應該重新指向他的個人資料頁面。然而,這種情況並非如此。 這是一件應該做的頁面:如何格式化Login.php重定向到用戶的個人資料頁面
// if login is ok then we add a cookie
$_POST['username'] = stripslashes($_POST['username']);
$hour = time() + 3600;
setcookie(ID_startHere, $_POST['username'], $hour);
setcookie(Key_startHere, $_POST['pass'], $hour);
//then redirect them to the members area
header("Location: myprofile.php?username=$username");
但是,相反,我只是不斷收到:
Warning: extract() [function.extract]: First argument should be an array in /mounted-storage/home94c/sub005.... myprofile.php
我很感激你的答案。謝謝。我可以在這裏想到的
問題出在'myprofile.php'上。從中看到一些代碼會很有用。 – EmCo 2011-03-30 04:32:47
我當然希望你沒有在$ _POST變量上使用extract()函數。這非常危險。 – Flipper 2011-03-30 05:35:07