Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ( isset ($_POST['submit'])) {
- if ( (!empty ($_POST['username'])) && (!empty ($_POST['password'])) ) {
- if ($_POST['username'] == 'testing' && $_POST['password'] == 'testpass') {
- print "Logged in as {$_POST['username']}";
- } else {
- print "You have the wrong username and/or password. Please fix this or stop trying to hack."
- }
- } else {
- print "I'm sorry but you have forgotten a field. Please fill the form out and try again.";
- } else {
- print '<form action="login.php" method="post">
- Username: <input type="text" name="username" size="20">
- Password: <input type="password" name="password" size"20">
- Confirm Password: <input type="confirm" name="confirm" size"20">
- Email: <input type="text" name="email" size"20">
- <input type="submit" name="submit" value "Log In!" />
- </form>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement