"; } if ($u == 2) { echo "This e-mail address isn't registered
"; } if ($p == 1) { echo "Please enter a password
"; } if ($p == 2) {echo "The password is wrong
"; } if ($u == 3 AND $p == 3) { echo "
Thankyou for registering your account!
Please log in below.........
"; } ?>} if (isset($loginsubmitted)) { $tbtemail = $_REQUEST["tbtemail"]; $tbtpassword = $_REQUEST["tbtpassword"]; $errors = 0; if ($tbtemail == "") { $errors++; $msg = $msg . "Please enter your e-mail address.
"; } if ($tbtpassword == "") { $errors++; $msg = $msg . "Please enter your password.
"; } //check if username exists include("$opendatabase"); $query = "SELECT * FROM tbt_members WHERE `email`='$tbtemail'"; $result = mysql_result($query); $numemail = mysql_num_rows($result); if ($numemail == 0) { $errors++; $msg = $msg . "This e-mail address isn't registered.
"; } //check if supplied password matches this email include("$opendatabase"); $query2 = "SELECT * FROM tbt_members WHERE `email`='$tbtemail' AND `pass`='$tbtpassword'"; $result2 = mysql_result($query2); $numpass = mysql_num_rows($result2); if ($numpass == 0) { $errors++; $msg = $msg . "Please re-enter your password.
"; } die("There has been $errors errors!"); if ($errors == 0) { ?> ; } else { echo $msg; printform(); } } else { printform(); } ?>