'; if(!$first_name){ $_SESSION['msg'] .= "First Name is a required field. Please enter it below.
"; } if(!$last_name){ $_SESSION['msg'] .= "Last Name is a required field. Please enter it below.
"; } if(!$email_address){ $_SESSION['msg'] .= "Email Address is a required field. Please enter it below.
"; } if(!$username){ $_SESSION['msg'] .= "Desired Username is a required field. Please enter it below.
"; } require 'header.inc.php'; include 'join_form.php'; // Show the form again! $have_errors=true; /* End the error checking and if everything is ok, we'll move on to creating the user account */ }; /* Let's do some checking and ensure that the user's email address or username does not exist in the database */ if (!$have_errors) { opendb() or die(mysql_error()); $sql_email_check = mysql_query("SELECT email FROM users WHERE email='$email_address'"); $sql_username_check = mysql_query("SELECT username FROM users WHERE username='$username'"); $email_check = mysql_num_rows($sql_email_check); $username_check = mysql_num_rows($sql_username_check); if(($email_check > 0) || ($username_check > 0)){ $_SESSION['msg'] = "Please fix the following errors:
"; if($email_check > 0){ $_SESSION['msg'] .= "Your email address has already been used by another member in our database. Please submit a different Email address!
"; unset($email_address); } if($username_check > 0){ $_SESSION['msg'] .= "The username you have selected has already been used by another member in our database. Please choose a different Username!
"; unset($username); } require 'header.inc.php'; include 'join_form.php'; // Show the form again! $have_errors=true; } } if (!$have_errors){ /* Everything has passed both error checks that we have done. It's time to create the account! */ //$random_password = makeRandomPassword(); $db_password = md5($password); // Enter info into the Database. $sql = mysql_query("INSERT INTO users (first_name, last_name, email, username, password, signup_date, cbid, ref_user_id) VALUES('$first_name', '$last_name', '$email_address', '$username', '$db_password', now(),'$cbid', $ref_id)" ) or die (mysql_error()); if(!$sql){ echo 'There has been an error creating your account. Please contact the webmaster.'; } else { $userid = mysql_insert_id(); require 'header.inc.php'; ?>

Your registration was successful.
You can now log in to your account.

Your ref. link, should you wish to promote CBTool, is
?by=
(you can also find it on your "Profile" page)