Revision: 50388
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at August 19, 2011 08:16 by kbrown
Initial Code
<?php if($_POST['user']) { if(($_POST['user'] == "Username1") && ($_POST['pass'] == "Password1")) header("Location: http://the page to go to.com"); else if(($_POST['user'] == "User2") && ($_POST['pass'] == "Password2")) header("Location: http://the page to go to .com"); else header("Location: error.htm"); } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>php log in script</title> </head> <body> <br><br> <center> <font size= "6">Please Log In Below</font><br><br><br> <form action="<?=$PHP_SELF?>" method="post"> <p>Username: <input type="text" name="user"/> Password: <input type="password" name="pass"/> <input type= "submit" value= "Log In"/></p> </form> </center> </body> </html> <?php } ?>
Initial URL
http://www.dynamicdrive.com/forums/showthread.php?t=28358
Initial Description
Initial Title
PHP - Basic Login
Initial Tags
login
Initial Language
PHP