All right, this is the code I wrote up. Again, I should remind you that I\'m a beginner, so I\'m sure there are alot of mistakes here.
Okay one thing I wanted to do was to check for all three duplications at one time. I dont want to exit the script after finding a duplicate username and then make the user come back only to find another duplicate(this time in the email or the name field). I want to be able to check for all three at the same time. Is that possible?
Okay, so this is the code I tried, but it doesn\'t seem to work. Any suggestions?
<?php
$server= //mysql server address
$dbname= // mysql database name
$uid= // username for that database
$pwd= // password for that database
$verifya = \"SELECT * FROM MEMBERS\";
$verifya .= \"WHERE USERNAME = $USERNAME\";
$conn=mysql_connect($server,$uid,$pwd) or die(\"Unable to connect to SQL server\");
mysql_select_db($dbname, $conn) or die(\"Unable to select database\");
$verification = mysql_query($verifya);
if (isset($verification)) {
echo \"Sorry, the username <font color=red><b>$USERNAME</b></font> has already been chosen\";
echo \"<p>\";
}
$verifyb = \"SELECT * FROM MEMBERS\";
$verifyb .= \"WHERE FIRST_NAME = $FIRST_NAME AND\";
$verifyb .= \"LAST_NAME = $LAST_NAME\";
$verificationb = mysql_query($verifyb);
if (isset($verificationb)) {
echo \"Sorry, the name <font color=red><b>$FIRST_NAME $LAST_NAME</b></font> already exists in the member base\";
echo \"<p>\";
}
$verifyc = \"SELECT * FROM MEMBERS\";
$verifyc .= \"WHERE EMAIL = $EMAIL\";
$verificationc = mysql_query($verifyc);
if (isset($verificationc)) {
echo \"Sorry, the email <font color=red><b>$EMAIL</b></font> has previously been submitted\";
echo \"<p>\";
exit;
}
else
{
This is where I insert the member info if there are no duplications.
?>
-SH