Hello all. In this following code, everything works just fine except when all for the last statment (the part will it says it will be online shortly). If you try to make it fail it will, but if you try to make it pass then it will display nothing. Any help getting it to display the correct information would be appreciated.
include('connect.inc.php');
$exempt = array("webmaster", "admin", "administrator", "adminstration", "god", "system", "unknown", "owner");
if($username) { $username = strtolower($username); } //make the username lowercase
if(!$username){ echo "<p class='style1' align='center'>You did not select a username.</p>"; }
elseif(in_array($username, $exempt) == TRUE){ echo "<p class='style1' align='center'>We apologize, but ".$username." is blacklisted.<br>Please try again.</p>"; }
else { //if no errors
$email = $username.$domain;
$query = mysql_query("SELECT * FROM taken_emails WHERE email='$email'") or die(mysql_error());
$rows = mysql_num_rows($query) or die(mysql_error());
if($rows == "1") { // if email is taken
echo "<p class='style1' align='center'>We apologize but ".$email." has already been selected by another user. <br>Please try again.</p>";
} else { //if name is not taken
echo "<p class='style1' align='center'>We apologize but our e-mail purchase form will be online shortly.</p>";
} // end if email is taken check
}// end error check
THANKS!