iSage ADSL2 Registration
if (!empty($errors)) { // if there are errors echo "
- \n";
foreach($errors as $value){print "
- $value \n";} echo "
////////////////////////////////////////////////// // signup page 1 form validator ////////////////////////////////////////////////// if (!empty($_POST[submit])) { if (empty($_POST[signup_type])) {$errors[] = "Please select the type of ADSL2 installation";} if (empty($_POST[plan])) {$errors[] = "Please select a plan";} if (empty($_POST[bundle])) {$errors[] = "Please select whether you would like to bundle your phone or not";} // cust info if (empty($_POST[first_name]) or empty($_POST[last_name])) {$errors[] = "Please enter both your first and last names";} if (empty($_POST[dob_day]) or empty($_POST[dob_year])) {$errors[] = "Please enter your date of birth";} // billing address info if (empty($_POST[bill_street_no])) {$errors[] = "Please enter an street or PO Box number";} if (empty($_POST[bill_street])) {$errors[] = "Please enter an street name";} if (empty($_POST[bill_suburb])) {$errors[] = "Please enter a suburb";} if (empty($_POST[bill_postcode])) {$errors[] = "Please enter a postcode";} if ($_POST[bill_add_type] <> "PO Box" and empty($_POST[bill_street_type])) {$errors[] = "Please enter an address type";} // if (!empty($_POST[email_address])) { if (!preg_match('/^[A-Z0-9._%-]+@(?:[A-Z0-9-]+\\.)+[A-Z]{2,4}$/i', $_POST[email_address])) { $errors[] = "Please enter a valid email address"; // } } // if there are no form errors if(empty($errors)) { // format the DOB $dob = $_POST[dob_day] . '-' . $_POST[dob_month] . '-' . $_POST[dob_year]; session_start(); $_SESSION['signup_type'] = $_POST[signup_type]; $_SESSION['plan'] = $_POST[plan]; $_SESSION['bill_add_type'] = $_POST[bill_add_type]; $_SESSION['first_name'] = $_POST[first_name]; $_SESSION['last_name'] = $_POST[last_name]; $_SESSION['dob'] = $dob; $_SESSION['bill_street_no'] = $_POST[bill_street_no]; $_SESSION['bill_street'] = $_POST[bill_street]; $_SESSION['company_name'] = $_POST[company_name]; $_SESSION['abn'] = $_POST[abn]; $_SESSION['bill_unit'] = $_POST[bill_unit]; $_SESSION['bill_unit_no'] = $_POST[bill_unit_no]; $_SESSION['bill_street_type'] = $_POST[bill_street_type]; $_SESSION['bill_suburb'] = $_POST[bill_suburb]; $_SESSION['bill_postcode'] = $_POST[bill_postcode]; $_SESSION['bill_state'] = $_POST[bill_state]; $_SESSION['home_phone'] = $_POST[home_phone]; $_SESSION['work_phone'] = $_POST[work_phone]; $_SESSION['mobile'] = $_POST[mobile]; $_SESSION['email_address'] = $_POST[email_address]; $_SESSION['bill_add_type'] = $_POST[bill_add_type]; $_SESSION['bundle'] = $_POST[bundle]; $_SESSION['promo_code'] = $_POST[promo_code]; $_SESSION['dl'] = $_POST[dl]; $_SESSION['secret_que'] = $_POST[secret_que]; $_SESSION['secret_ans'] = $_POST[secret_ans]; $_SESSION['id']=session_id(); $_SESSION['first_name']=$_POST[first_name]; $_SESSION['contract']=$_POST[contract]; // go to next stage of the signup header( "Location: signup_step2.php" ); exit; } } ////////////////////////////////////////////////// // get the HTML page headers include('../include/html_headers.php'); ?>