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