A simple login form

A simple login form - </form><?php elseif...

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: </form> <?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’]); ?> <a href=”login.php”>Back to login</a> <?php } ?>...
View Full Document

This note was uploaded on 04/01/2008 for the course INFO 2300 taught by Professor Williamson during the Spring '08 term at Cornell.

Ask a homework question - tutors are online