Maybe it's throwing an error, but you're not checking the query...
I'd suggest changing this:
$queryreg = mysql_query ("
INSERT INTO users VALUES (' ', '$fullname', '$username', '$password', '$date', )
");
to:
$queryreg = mysql_query ("
INSERT INTO users VALUES (' ', '$fullname', '$username', '$password', '$date', )
") or die(mysql_error());
That way you'll get an error if the query fails for some reason, and you have a place to start debugging.
As a tip to your general scripting style... I personally think it's better (and at least easier to have overview) if you don't nest that many if statements within eachother..
Like instead of doing:
if ($newpass == $newpassrepeated) {
if (strlen($username) > 25) {
if (strlen($realname) > 25) {
// perform script
}
else { echo 'Your real name is too long'; }
}
else { echo 'Your username is too long'; }
}
else { echo 'Your passwords don't match'; }
I prefer this:
if ($newpass != $newpassrepeated) {
$error = 1;
} elseif (strlen($username) > 25) {
$error = 2;
} elseif (strlen($realname) > 25) {
$error = 3;
}
if (!$error) {
// perform script
}
else {
if ($error == 1) { echo 'Passwords don't match.'; }
elseif ($error == 2) { echo 'Username is too long.'; }
elseif ($error == 3) { echo 'Realname is too long.; }
Everybody develops their own scripting style and some may be better then others, but this is what I prefer and would like to suggest to you. I also made a script with nested if's before and at a certain point it became real buggy.. to such an extent I chose to just rewrite the whole thing instead of debugging it.
Just a suggestion. 😉