我在index.php上有一個登錄表單。如果沒有登錄,請輸入登錄形式PHP
我想要的是,在此頁面上,如果您已經登錄,則不應出現html表單。如果你已經登錄,你應該在index.php上看到你的用戶名和註銷按鈕。
如果你沒有登錄,這種形式應該出現:
<form action="<?php $PHP_SELF; ?>" method="post" >
<h1>Login Form</h1>
<div>
<input type="text" placeholder="Username)" required="" id="username" />
</div>
<div>
<input type="password" placeholder="Password" required="" id="password" />
</div>
<div>
<input type="submit" value="Log in" />
<a href="#">Lost your password?</a>
<a href="#">Register</a>
</div>
</form>
有人誰可以幫我嗎?
你爲什麼使用'header'?他已經在'index.php'頁面 – 2013-03-16 08:28:22
頭部用於其他頁面 前兩部分用於索引頁面,第三部分用於任何其他頁面來驗證會話 – Shahbaz 2013-03-16 08:31:04