if(isset($_POST['submit'])) { /*check if submit button pressed */
if(!$_POST['username']) /* check if username field is empty */
die("Error: You must enter your <font color='red'><b>username</b></font> before logging in.
<a href=\"login.php\">Try again </a>");
if(!$_POST['password']) /* check if password field is empty */
die("Error: You must enter your <font color='red'><b>password</b></font> before logging in.
<a href=\"login.php\">Try again</a>");
/* verify if user is recorded in our database and if the password entered is identically with that from our database... */
$get_user = mysql_query("SELECT * FROM `members` WHERE username = '".$_POST['username']."' AND password = '".md5($_POST['password'])."'"); /* calculates the md5 hash of the password and returns the hash which is a 32 character hexadecimal number */