0 ) $arrErrors['email'] = 'This email address has already been used by someone. Please enter a different email address'; } if ($username == '') $arrErrors['username'] = 'Please enter a desired username. Username can only contain letters (a-z) and numbers (0-9)'; else if (!preg_match('/^[a-zA-Z0-9][\w]+[a-zA-Z0-9]$/',$username)) $arrErrors['username'] = 'The username must contain only letters and numbers'; if ($password == '') $arrErrors['password'] = 'Please enter a password!'; else if ( $password != '' && strlen($password)<3 ) $arrErrors['password'] = 'The password has less than 4 characters. Please enter a longer password!'; if ($password != '' && $repeat_password == '') $arrErrors['repeat_password'] = 'Please type the password again!'; else if ( $password != $repeat_password ) $arrErrors['repeat_password'] = 'The password aren\'t the same'; if ($city == '') $arrErrors['city'] = 'Please enter a city!'; if ($zipCode == '') $arrErrors['zipCode'] = 'Please enter a Postal code.'; else if (!preg_match("/^[0-9]+$/",$zipCode)) $arrErrors['zipCode'] = 'The zip code must contain only digits'; if ($gender == '') $arrErrors['gender'] = 'Please select male or female!'; if ($birthday_mon == '') $arrErrors['birthday_mon'] = 'Please select your birthday month!'; if ($birthday_day == '') $arrErrors['birthday_day'] = 'Please select your birthday day!'; if ($birthday_yr == '') $arrErrors['birthday_yr'] = 'Please select your birthday year!'; if ($verification_code == '' ) $arrErrors['verification_code'] = 'Please enter the code shown in the black rectangle!'; else if ($_SESSION['new_string'] != $verification_code) $arrErrors['verification_code'] = 'The security code doesn\'t match!'; if ($terms == '') $arrErrors['checkbox'] = 'You cannot create an account unless you agree to terms and services'; if (count($arrErrors) == 0) { $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From: do-not-reply@yardsaway.com \r\nReply-to: do-not-reply@yardsaway.com\r\n"; // $headers .= "BCC: do-not-reply@yardsaway.com\r\n"; $subject = "YardsAway.com! - You just joined your community, online! "; $message = ""; $message .= "\n \n"; $message .= "\n"; $message .= "

Congratulations and welcome to yardsaway.com! We are excited to have you as our neighbor.

At yardsaway.com there are numerous benefits for you to enjoy. We offer you an exciting new venue to connect with the neighbors and businesses right in your community.

Now, you can go to one online source for networking, shopping and saving. Additionally, enjoy learning new recipes and save more with our online coupons from you favorite local stores.

"; $message .= "

Your login details are:."; $message .= "

Username: $username
Password: $password
"; $birthday_date = $birthday_yr."/".$birthday_mon."/".$birthday_day; $q = ("INSERT INTO `tbl_neighbors` (`neighbor_email`, `neighbor_username`, `neighbor_password`, `neighbor_streetaddress`, `neighbor_city`, `neighbor_state`, `neighbor_zipcode`, `neighbor_gender`, `neighbor_dateofbirth`, `neighbor_signupdate`) VALUES ( '$email', '$username', '$password', '', '$city', '$state', '$zipCode', '$gender', '". date("Y-m-d",strtotime($birthday_date))."', current_date())"); // echo $q; mysql_query($q) or die(mysql_error()); // $message .= "

Please ensure that you read our Service Providers Terms and Conditions.

"; $message .= "

We look forward in working with you.

"; $message .= "

Please contact us if you have any questions and again thanks for joining our community

"; $message .= "

Yours Truly

Neighbor Suppor Team
www.yardsaway.com"; $message .= ""; $_SESSION['neighborId']=mysql_insert_id(); @mail ($txtEmailAddress,$subject,$message,$headers); header ("Location: thankyou.php"); } else { $strError = '

There are errors! Please correct them

'; } } } if (isset($_GET['loginError'])) $message = "

Incorrect username or password!

"; if (isset($_POST['btnForgotPassword'])) { if (!preg_match("/^[\d\w\/+!=#|$?%{^&}*`'~-][\d\w\/\.+!=#|$?%{^&}*`'~-]*@[A-Z0-9][A-Z0-9.-]{1,61}[A-Z0-9]\.[A-Z]{2,6}$/i",$_POST['txtForgotEmailAddress'])) $message = "

The email address is not valid

"; else { $sql = "select neighbor_password from tbl_neighbors where neighbor_email='".$_POST['txtForgotEmailAddress']."'"; $result = dbQuery($sql); if (mysql_num_rows($result) > 0 ) { $row = mysql_fetch_assoc($result); mailForgottenPassword($_POST['txtForgotEmailAddress'],$row['neighbor_password']); $message = "

The password has been sent to
".$_POST['txtForgotEmailAddress']."

"; } else { $message = "

The e-mail address doesn't exists in our database

"; } } } ?> Neighbor Sign up page | Get Coupons, View Business Video Ads, Meet people. YardsAway.com - Your community, virtually!

Join our community of neighbors!

')?> ')?> ')?> ')?> ')?> ')?> ')?> ') ?> ')?> ')?> ')?>
It's easy and FREE! (Why join?)
Just fill out the account info below and start saving money and meeting other neighbors.

Own a business? Sign up as a YA business!
(All fields required)
Email Address: />
'.$arrErrors['email'].'
User Name: />
'.$arrErrors['username'].'
Password: />
'.$arrErrors['password'].'
Confirm Password: />
'.$arrErrors['repeat_password'].'
City: />  
'.$arrErrors['city'].'
State:  
Postal Code: />
 
'.$arrErrors['zipCode'].'
Gender: > " /> Male   /> Female
'.$arrErrors['gender'].'
Date of Birth:
'.$arrErrors['birthday_mon'].'
'.$arrErrors['birthday_day'].'
'.$arrErrors['birthday_yr'].'
Verification:
/>   

Enter the text in the image  
'.$arrErrors['verification_code'].'
  /> '.$arrErrors['checkbox'].'

')?>

Forgot password?