"; elseif((strlen($uname) < 3) || (strlen($uname) > 16)) $errorstring .= "Your username must be between 3 and 16 characters long.
"; elseif(!allowedChars($uname)) { $newuname = $uname; $newuname = str_replace(" ", "", $newuname); $newuname = str_replace("=", "", $newuname); $newuname = str_replace("+", "", $newuname); $newuname = str_replace(",", "", $newuname); $newuname = str_replace(".", "", $newuname); $newuname = str_replace(")", "", $newuname); $newuname = str_replace("(", "", $newuname); $newuname = str_replace("*", "", $newuname); $newuname = str_replace("&", "", $newuname); $newuname = str_replace("^", "", $newuname); $newuname = str_replace("%", "", $newuname); $newuname = str_replace("$", "", $newuname); $newuname = str_replace("", "", $newuname); $newuname = str_replace("\"", "", $newuname); $newuname = str_replace("!", "", $newuname); $newuname = str_replace("", "", $newuname); $newuname = str_replace("`", "", $newuname); $newuname = str_replace("#", "", $newuname); $newuname = str_replace("~", "", $newuname); $newuname = str_replace(":", "", $newuname); $newuname = str_replace(";", "", $newuname); $newuname = str_replace("[", "", $newuname); $newuname = str_replace("]", "", $newuname); $newuname = str_replace("{", "", $newuname); $newuname = str_replace("}", "", $newuname); $newuname = str_replace("@", "", $newuname); $newuname = str_replace("'", "", $newuname); $newuname = str_replace("/", "", $newuname); $newuname = str_replace("\\", "", $newuname); $newuname = str_replace("?", "", $newuname); $newuname = str_replace(">", "", $newuname); $newuname = str_replace("<", "", $newuname); $errorstring .= "Usernames must only contain letters, numbers, hyphens, underscores and no spaces!
- We recommend using $newuname
"; $uname = $newuname; } else { $result1 = mysql_query("SELECT * FROM members WHERE username = \"$uname\""); $result2 = mysql_query("SELECT * FROM emailconfirm WHERE username = \"$uname\""); if((mysql_numrows($result1) + mysql_numrows($result2)) > 0) $errorstring .= "Your chosen username is already taken. Please choose another.
"; } if($email != $email2) $errorstring .= "The email addresses you entered do not match.
"; else { $result1 = mysql_query("SELECT * FROM members WHERE email = \"$email\""); if(mysql_numrows($result1) > 0) $errorstring .= "Your email address is already registered!
"; elseif(strlen($email) < 9 || strlen($email) > 64) $errorstring .= "Please enter a valid email address.
"; else { $emailtail = strstr($email, '@'); if(!strstr($email, '@') || !strstr($emailtail, '.')) $errorstring .= "Please enter a valid email address.
"; } } if($signcountry == "United Kingdom") { if(strlen($pcarea) < 1) $errorstring .= "Please enter the first half of your postcode.
"; else { $result = mysql_query("SELECT * FROM postcodes WHERE areacode = \"$pcarea\""); if(mysql_numrows($result) != 1) $errorstring .= "Your postcode area cannot be found - please check and try again.
"; } } if($signcountry == "United States") { if(strlen($pcarea) < 1) $errorstring .= "Please enter your zip code.
"; else { $result = mysql_query("SELECT * FROM zip_codes WHERE zip = \"$pcarea\""); if(mysql_numrows($result) != 1) $errorstring .= "Your zip code cannot be found - please check and try again.
"; } } if(($gender != "M") && ($gender != "F") && ($gender != "C")) $errorstring .= "Please select your registration type.
"; $noautomationcode = $HTTP_SESSION_VARS["noautomationcode"]; $code = trim($HTTP_POST_VARS["code"]); if($code != $noautomationcode){ $errorstring .= "You confirmation code did not match, please try again.
"; } if(strlen($errorstring) == 0) { $unlockcode = md5(mktime(now).ip()); if(($signcountry != "United Kingdom") AND ($signcountry != "United States")) $pcarea = "NULL"; $query = "INSERT INTO emailconfirm (username, email, postcode, gender, unlockcode, dateadded, affid, country) VALUES(\"$uname\", \"$email\", \"$pcarea\", \"$gender\", \"$unlockcode\", ".mktime(now).", \"$_SESSION[affid]\", \"$signcountry\")"; $result = mysql_query($query); $mailmessage = "Dear $uname,\n\nThank you for signing up with Love-Personals.co.uk. To continue the sign up process please visit the web link below to validate your email address (you may need to copy and paste the link into your browser).\n\nhttp://www.love-personals.co.uk/sign-up-2.html?validate=$unlockcode\n\nPlease Note: If you do not validate your email address within 7 days of filling in the initial sign up form you will need to start the sign up process again.\n\nIf you believe you have received this email in error and do not want to sign up to Love-Personals.co.uk just ignore this email and you will not hear from us again.\n\nKind regards,\nThe Love-Personals.co.uk Team"; $sent = mail($email, "Welcome to Love-Personals.co.uk", $mailmessage, "FROM: do-not-reply@love-personals.co.uk"); echo "


You have been sent an email (to $email) with a link you need to visit to confirm your email address. Once your address has been confirmed you can go on to complete the rest of the sign up process.

Please note: If you do not verify your email address within 7 days you will need to start the sign up process again."; echo "



Not receiving the welcome email?

If you do not receive the welcome email please check that your email provider hasn't filed it as spam. If you don't receive the email within an hour or so please start the signup process again, if possible using another email address.
"; echo "


Go Home"; include("footer.php"); exit; } } ?>


Fill in the form below to sign up for FREE membership and start meeting new people in your area today! If you are already a member, please click here to login.
0) echo "
\"error!\"Error(s) Found:

$errorstring


"; ?>
Please choose a username:>
Please enter your email address:>
Verify your email address:>
Where do you live?
UK/US:  Please enter the 1st half of your postcode or your full zip code: onChange="JavaScript:postcodeChange();">  what's this?!
AND/OR:
Overseas:  Please select your country:
Register as:> Male
> Female
Confirmation:  Please enter the confirmation code as shown in the image to the right. This will help us to stop automated signups on the site: EHTML; echo($html_form); ?> >
Terms and Conditions: (by submitting this form, you are agreeing to our terms and conditions)

>