Register Today

text("register_success"); $user_id = $user->display("id", 1, "email = '" . $_POST['email'] . "'", ""); $data = array( "maplat" => $_POST['lat'], "maplon" => $_POST['lon'] ); $user->update($data, $user_id); $loginEmail = $regEmail; require("include/form_client_login.php"); } else { if ($_POST['register'] == '1') { // Set initial error states $err_email = 0; $err_name = 0; $err_pass = 0; $err_surname = 0; // Clean and check form data is correct $regName = clean_text($_POST['regName']); $regSurname = clean_text($_POST['regSurname']); $regEmail = clean_text($_POST['regEmail']); $regEmail2 = clean_text($_POST['regEmail2']); $regPass = clean_text($_POST['regPass']); $regPass2 = clean_text($_POST['regPass2']); $address = clean_text($_POST['address']); $area = clean_text($_POST['area']); $postalcode = clean_text($_POST['postalcode']); $telephone = clean_text($_POST['telephone']); // Check email is valid if (!validate_email($regEmail)) { $err_email = 1; $email_message = "
  • The email address you have supplied is not valid
  • "; } if ($regEmail !== $regEmail2) { $err_email = 1; $email_message2 = "
  • The email addresses you have supplied do not match
  • "; } // Check names if (strlen($regName) < 1) { $err_name = 1; $name_message = "
  • Please supply a first name"; } if (strlen($regSurname) < 1) { $err_surname = 1; $surname_message = "
  • Please supply a surname"; } // check address if (strlen($address) < 1) { $err_name = 1; $address_message = "
  • Please supply your address"; } // check area if (strlen($area) < 1) { $err_name = 1; $area_message = "
  • Please supply your city or town"; } // check postalcode if (strlen($postalcode) < 1) { $err_name = 1; $postal_message = "
  • Please supply your postal code"; } // check telephone if (strlen($telephone) < 1) { $err_name = 1; $telephone_message = "
  • Please supply a contact number"; } // Check pass if (strlen($regPass) < 6) { $err_pass = 1; $password_message = "
  • Your password is too short - please use at least 6 characters
  • "; } if ($regPass !== $regPass2) { $err_pass = 1; $password_message2 = "
  • The passwords you have supplied do not match
  • "; } // Check if email is already registered $user = new User; $existing_email = $user->display("email_check", 0, "email = '" . $regEmail . "'", ""); if ($existing_email > 0 and $err_email == 0) { $err_existing = 1; $existing_message = "
  • This email address has already been registered. To recover an old account or find a lost password please visit our support page
  • "; } $error_count = $err_email + $err_name + $err_pass + $err_surname + $err_existing; if ($error_count > 0) { ?>

    text("register_error") ?>

    $regName, "surname" => $regSurname, "email" => $regEmail, "password" => $hashedPass, "fullname" => $regName . " " . $regSurname, "address" => $address, "area" => $area, "postalcode" => $postalcode, "telephone" => $telephone, "date_added" => time() ); $user->add($data); // Send confirmation email $email_data = array( "firstname" => $regName, "surname" => $regSurname, "email" => $regEmail, "password" => $regPass, "date" => time() ); $email = new Email; // First to the client //$email->send_email($regEmail, "client_registration", $email_data); // and then to the admin //$email->send_email($regEmail, "admin_registration", $email_data); $site->text("register_map_info"); echo "
    "; include("mapping.php"); ?>

    Once you have selected your location on the map please click the continue button to complete registration.

    "; } if ($error_count > 0) { require("include/form_client_register.php"); } } else { include("include/form_client_register.php"); } } ?>