$value) { $$key = $value; } if(!$username) {$msg = "Please enter a username"; $error = true;} else if(!$password1) {$msg = "Please enter a valid Password"; $error = true;} else if($password1 != $password2) {$msg = "Please ensure your passwords match"; $error = true;} else if(!$buyer_agree) {$msg = "You must agree to the terms of use to proceed"; $error = true;} //CHECK VERIFICATION CODE if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) { // Insert you code for processing the form here, e.g emailing the submission, entering it into a database. unset($_SESSION['security_code']); } else {$msg = "Incorrect Verification Code: Please enter the human verification field correctly"; $error = true;} //------// $sql = "SELECT username FROM accounts WHERE username='$username'"; $result = mysql_query($sql); while($row=mysql_fetch_array($result)) { $found_username = $row["username"]; } if($found_username) {$msg = "This username has already been taken, please select another."; $error = true;} else if( (ereg('[^A-Za-z0-9]', $username)) || (strlen($username) > 10) ) {$msg = "Invalid username. Please ensure the name consists of only letters and numbers and is less than 10 characters long."; $error = true;} else if(!$error) { $now = time(); $sql = "INSERT INTO accounts (username,password,enrollment_date,type) VALUES('$username','$password1','$now','buyer')"; mysql_query($sql); $user_id = mysql_insert_id(); $sql = mysql_query("INSERT INTO client_contact_info (user_id) VALUES ('$user_id')"); /*$sql = mysql_query("INSERT INTO client_applicant_info (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_types_of_services_provided (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_location_of_services (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_supplemental_staffing (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_employee_independent_contractors (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_previous_insurance (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_hiring_screening (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_risk_management (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_optional_coverages (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_auto_information (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_medical_supplies (user_id) VALUES ('$user_id')"); $sql = mysql_query("INSERT INTO client_abuse (user_id) VALUES ('$user_id')"); */ //CREATE BUYER FOLDER if(!file_exists("buyers/$username/")) { mkdir("buyers/$username/", 0777); chmod("buyers/$username", 0777); } session_start(); unset($_SESSION["agent_id"]); unset($_SESSION["insurer_id"]); $_SESSION["user_id"] = $user_id; $_SESSION["buyerLogged"] = true; $_SESSION["username"] = $username; $_SESSION["first_name"] = $first_name; $_SESSION["last_name"] = $last_name; header("Location: client-administration.php"); } } ?> My True Quote - Get Every Quote, Every Time!

Buyer Signup

".$msg."";?>

To start your buyer application, please provide us with the information below to create an account

(Limit 10 characters of letters and numbers only)



>


Human Verification
To verify you are not a spam bot, please type in the characters as you see them.
captcha