A simple login form - </form>...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
A simple login form Complete the code below for a simple login form (login.php) that protects a single page. <?php ?> <h1>Log in</h1> <form action=”login.php” method=”post”> Username: <input /> <br /> Password: <input /> <br /> <input type=”submit” value=”Submit” />
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &lt;/form&gt; &lt;?php } elseif ( ) { print(You have accessed the secret content of this page. \n); } else { print(You did not log in successfully.\n); print(Please try again.\n); unset($_POST[username]); unset($_POST[password]); ?&gt; &lt;a href=login.php&gt;Back to login&lt;/a&gt; &lt;?php } ?&gt;...
View Full Document

Ask a homework question - tutors are online