我正在做一個登錄和註冊系統,但我的頭重定向不能正常工作而不是重定向我到我home.php頁面上登錄它把我送到我的index.php。PHP的標題( 「位置:home.php」);不重定向我正確
這裏是代碼:
$_SESSION["user_login"] = $user_login;
header("Location: home.php");
exit();
} else {
echo 'That information is incorrect, try again';
exit();
爲什麼形式操作設置爲的index.php但是當我將其更改爲home.php發送我有,但不記錄我 這裏是形式代碼:
<form action="index.php" method="POST">
<input type="text" name="user_login" size="25" placeholder="Username" /><br /><br />
<input type="text" name="password_login" size="25" placeholder="Password" /><br /><br />
<input type="submit" name="login" value="Login">
</form>
能否請您添加完整的index.php代碼 –
[HTML5的佔位符屬性是不是爲標籤元素的替代品(http://www.456bereastreet.com/archive/201204/the_html5_placeholder_attribute_is_not_a_substitute_for_the_label_element/),因爲出口 – Quentin