Please enter your first name!

'; } // Check for a last name. if (eregi ('^[[:alpha:]\.\' \-]{2,30}$', stripslashes(trim($_POST['last_name'])))) { $ln = escape_data($_POST['last_name']); } else { $ln = FALSE; echo '

Please enter your last name!

'; } // Check for an email address. if (eregi ('^[[:alnum:]][a-z0-9_\.\-]*@[a-z0-9\.\-]+\.[a-z]{2,4}$', stripslashes(trim($_POST['email'])))) { $e = escape_data($_POST['email']); } else { $e = FALSE; echo '

Please enter a valid email address!

'; } // Check for a password and match against the confirmed password. if (eregi ('^[[:alnum:]]{4,20}$', stripslashes(trim($_POST['password1'])))) { if ($_POST['password1'] == $_POST['password2']) { $p = escape_data($_POST['password1']); } else { $p = FALSE; echo '

Your password did not match the confirmed password!

'; } } else { $p = FALSE; echo '

Please enter a valid password!

'; } if ($fn && $ln && $e && $p) { // If everything's OK. // Make sure the email address is available. $query = "SELECT user_id FROM users WHERE email='$e'"; $result = mysql_query ($query) or trigger_error("Query: $query\n
MySQL Error: " . mysql_error()); if (mysql_num_rows($result) == 0) { // Available. // Create the activation code. $a = md5(uniqid(rand(), true)); // Add the user. $query = "INSERT INTO users (email, pass, first_name, last_name, active, registration_date) VALUES ('$e', MD5('$p'), '$fn', '$ln', NULL, NOW() )"; $result = mysql_query ($query) or trigger_error("Query: $query\n
MySQL Error: " . mysql_error()); if (mysql_affected_rows() == 1) { // If it ran OK. // Send the email. $body = "Thank you for registering at StepPrep.com. You can log in with your email (username) and password:\n\n"; $body .= "password = $p"; $body .= "\n\nhttp://www.stepprep.com"; mail($_POST['email'], 'Registration Confirmation', $body, 'From: subscribe@stepprep.com'); $whoamiapproving = "A new user has registered: "; $whoamiapproving .= "$e, $fn $ln"; mail('subscribe@stepprep.com','New StepPrep Registration',$whoamiapproving, 'From:subscribe@stepprep.com'); // Finish the page. //echo '

Thank you for registering! Please sign in and pay the membership fee. Your password has been emailed to you.

'; echo '

Thank you for registering! You can sign in and start using your account immediately. Your username and password have been emailed to you for your records.

'; //exit(); } else { // If it did not run OK. echo '

You could not be registered due to a system error. We apologize for any inconvenience.

'; } } else { // The email address is not available. echo '

That email address has already been registered. If you have forgotten your password, use the link to have your password sent to you.

'; } } else { // If one of the data tests failed. echo '

Please try again.

'; } mysql_close(); // Close the database connection. } // End of the main Submit conditional. ?>

Sign Up - Registration

First Name:

Last Name:

Email Address:

Password: Use only letters and numbers. Must be between 4 and 20 characters long.

Confirm Password:

"...I signed up in Basic Sciences and used [StepPrep] in conjunction with my classes to drive home key concepts...I continued using [StepPrep] through clinicals in preparation for Step 1 and passed easily with a great score...I used the CS template to pass the clinical skills exam without a problem..I have not written Step 2CK yet but knowing I still have access to this great resource makes me confident I will pass it..."