我已经创建了一个登录页面,在用户通过验证后应该重新指向他的个人资料页面。然而,这种情况并非如此。 这是一件应该做的页面:如何格式化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