");
if($email10!='' && $password10!='' && $password20!='' && $name!='' && $zip!='' && $metro!=''){
if($password10=="$password20"){
$check=mysql_query("SELECT email FROM accounts WHERE email='$email10' && source='$publication'");
$check=mysql_fetch_assoc($check);
if($check[email]!=''){$goahead=""; $error_signup="An account has already been registered with that email address. ";}
else{
$zip=str_replace(" ", "", $zip);
$zip=strtoupper($zip);
$zip_length=strlen($zip);
if($zip_length>=6){$zip=substr($zip, 0, 3)." ".substr($zip, 3);}
$pos1=strpos("$zip", '00');
$pos2=strpos("$zip", '0');
if($pos1 === false){}
elseif($pos1!== false){if($pos1==0){$zip=substr($zip, 1);}}
if($pos2=== false){}
elseif($pos2!== false){if($pos2==0){$zip=substr($zip, 1);}}
$zip=mysql_query("SELECT * FROM zip_code WHERE zip_code='$zip'");
$zip=mysql_fetch_assoc($zip);
$phone=str_replace(" ", "", $phone); $phone=str_replace("-", "", $phone); $phone=str_replace("(", "", $phone); $phone=str_replace(")", "", $phone);
$phone=str_replace(".", "", $phone); $phone=str_replace("ext", "", $phone); $phone=str_replace("EXT", "", $phone);
$fax=str_replace(" ", "", $fax); $fax=str_replace("-", "", $fax); $fax=str_replace("(", "", $fax); $fax=str_replace(")", "", $fax);
$insert=mysql_query("INSERT INTO accounts(email, password, level, max_jobs, name, city, postal, country, province, metro, phone, fax, source) values('$email10', '$password10', '1', '0', '$name', '$zip[city]', '$zip[zip_code]', '$zip[country]', '$zip[state_prefix]', '$metro', '$fax', '$email', '$publication')");
$goahead='yes';
}
}
else{
$goahead="";
$error_signup="Please be sure to retype your desired password correctly. ";
}
}
else{
if($email10!='' or $password10!='' or $password20!='' or $name!='' or $zip!='' or $metro!=''){$error_signup="You must complete all fields below ";}
$goahead="";
}
if($goahead=='yes'){
print("
Congratulations
You have successfully created an account on the $title website.
You may log in using your email address and password, at the top of the page. In addition to searching employment opportunities
you will now be able to upload and manage your resumes as well as send them to employers.