Example #1
0
 public function DoRegAddress()
 {
     $street1 = Database::prepData($_POST['street1']);
     $street2 = Database::prepData($_POST['street2']);
     $type = Database::prepData($_POST['type']);
     $city = Database::prepData($_POST['city']);
     $state = Database::prepData($_POST['state']);
     $zip = Database::prepData($_POST['zip']);
     $country = Database::prepData($_POST['country']);
     $user = $_SESSION['user_id'];
     $sql = "INSERT INTO `useraddress`(`address_type_id`, `Street1`, `Street2`, `City`, `State`, `ZIP`, `Country`, `user_id`) \n\t\t\tVALUES ('{$type}','{$street1}','{$street2}','{$city}','{$state}','{$zip}','{$country}','{$user}')";
     Database::performQuery($sql);
     redirect_to(BASE_URL . '/Dashboard.html');
 }