Yeah its connected
The whole script works, except its printing the:
error("A database error occurred in processing your "."submission.\nIf this error persists, please "."contact dragon3l33t@aol.com.");
bit when it is clearly right.
Here is more of the code again:
else:
dbConnect('ofp');
if ($loginname=="" or $password=="" or $password2=="" or $email=="" or $email2=="" or $gender=="" or $dateyear="" or $datemonth="" or $country="") {
error("One or more required fields were left blank.\n".
"Please fill them in and try again.");
}
if ($password!=$password2 or $email!=$email2) {
error("Password or Email not matching.\n".
"Please fill them in and try again.");
}
// Check for existing user with the new id
$sql = "SELECT COUNT(*) FROM members WHERE username = '$loginname'";
$result = mysql_query($sql);
if (!$result) {
error("A database error occurred in processing your "."submission.\nIf this error persists, please "."contact dragon3l33t@aol.com.");
}
if (@mysql_result($result,0,0)>0) {
error("A user already exists with your chosen username.\n".
"Please try another.");
}
$sql = "INSERT INTO members SET
username = '$loginname',
password = '$password',
email = '$email',
gender = '$gender';
year = '$dateyear';
month = '$datemonth';
country = '$country';
rank = '1'";
if (!mysql_query($sql))
error("A database error occurred in processing your ".
"submission.\nIf this error persists, please ".
"contact dragon3l33taol.com.");
?>