Nope, it's set, I tried echoing it before and after that part of the code, and it does return the value.
Here's the whole function:
Function ConfirmRegister() {
global $username, $verify_username, $password, $verify_password, $emailaddress;
if ($username == $verify_username) {
$username_check = "pass";
}
$dup_query = mysql_query ("SELECT * FROM users WHERE username = '$username'");
$numusers = mysql_num_rows($dup_query);
if ($numusers = 0) {
$usernamesup_check = "pass";
}
if ($password == $verify_password) {
$password_check = "pass";
}
if ($username_check or $usernamedup_check or $password_check != "pass") {
echo ('
Sorry, there was a problem with your registration. Either the username you chose was already taken, the two usernames you typed in did not match or the two password you typed in do not match.<br>
Please press the <a href="javascript:history.back(-1);">back</a> button on your browser and try again.
');
}
else {
echo ('
Success!<br>
An email has been dispatched to the email address with copies of your username and password.<br>
You may now post with the username and password you chose.<br>
Click <a href="index.php">here</a> to return to the main page.
');
}
}
If you want to make that more... Clean, or anything too, then go right on ahead. I'm still grappling with Object-Orientated Programing so, it's a bit sloppy.