Simple log-in script, learn how to make a log-in system. (Remember no cookies or sessions are in this script)
<html> <head /> <body> <form action="index.php"method=POST> Username: <input type=text name=user><br /> Password: <input type=password name=pass><br /> <input type=submit value="OK!"><p> </form> <?php $user=$_POST('user'); $pass=$_POST('pass'); if (($user==".USERNAME. && ($pass=="PASSWORD")) echo "Access Granted" else echo "Access Denied!"; ?> </body> </html>
It's easy, but a nice code to have. It's pretty self-explanatory.
Also, near the bottom of the script you'll see "USERNAME" and "PASSWORD" just like that in capital letters, that is where you can change your username/password. Simple right?
Add your comment