\n\n
\n\nThis is a test to see if this works
\n\n
\n
The test link is here.
\n\n\n"; // Validate users input if(!empty($_POST)) { // Check email is a valid email address if(isset($_POST['email'])) if(!ereg("^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,}\\.[0-9]{1,}\\.[0-9]{1,}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,}|[0-9]{1,})(\\]?)$", $_POST['email'])) $eg_error['email'] = "You must enter a valid email address!"; // Check that username is numbers and letters if(isset($_POST['username'])) if(ereg("[!\"£\$%\^&\*()\+=\{}[.].][.[.]#~';:@/\.,<>\?\\| ]", $_POST['username'])) $eg_error['username'] = "The user name contains some illegal charactures, only use alpha-numeric charactures."; // Check that confirm_email is the same as (comparison) if(isset($_POST['confirm_email'])) if($_POST['confirm_email'] != @$eg_error['email']) $eg_error['confirm_email'] = "Your confirmation email address did not match!"; // Check password has a value if(empty($_POST['password'])) $eg_error['password'] = "Please enter a password."; // Check that confirmPass is the same as (comparison) if(isset($_POST['confirmPass'])) if($_POST['confirmPass'] != @$_POST['password']) $eg_error['confirmPass'] = "Your passwords do not match!"; // Get Record Set $eg_reccount_username = mysql_query("SELECT COUNT(username) FROM easyGen_userDetails WHERE username = '".$_POST['username']."'", $eg_objConn1); $eg_count_username = @mysql_fetch_array($eg_reccount_username, MYSQL_ASSOC); // Check if username is in data source if($eg_count_username['COUNT(username)'] > 0) $eg_error['username'] = "The user name you supplied is already in use!"; // Close recordset if(isset($eg_reccount_username)) @mysql_free_result($eg_reccount_username); // Check username has a value if(empty($_POST['username'])) $eg_error['username'] = "You must enter a user name!"; // Check if any errors were returned and run relevant code if(empty($eg_error)) { // Run query mysql_query("INSERT INTO `easyGen_userDetails`(`username`, `passwrd`, `firstName`, `surname`, `email`) VALUES('".@$_POST['username']."', '".@$_POST['password']."', '".@$_POST['firstName']."', '".@$_POST['surname']."', '".@$_POST['email']."')", $eg_objConn1); // Get identity of last record inserted $eg_identeasyGen_userDetails = mysql_insert_id($eg_objConn1); // Set Session Value $_SESSION['loggedInUser'] = $eg_identeasyGen_userDetails; // Check required values have been passed to email if(!empty($eg_error['email'])) { // Send email mail(@$eg_error['email'], "Your SlamDingo Account Sign-up!", $eg_text_1, "From: accounts@slamdingo.com\r\nMIME-Version: 1.0\r\nContent-type: text/html; charset=iso-8859-1\r\n"); } // Go to page header("Location: unnamed.php"); exit; } } ?>