Simple Log-In Script

Simple log-in script, learn how to make a log-in system. (Remember no cookies or sessions are in this script)

<head />

<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>



if (($user==".USERNAME. && ($pass=="PASSWORD")) echo "Access Granted"
else echo "Access Denied!";




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