Exemple #1
0
 }
 $custId = $_POST['hdnCustId'];
 $personId = $_POST['hdnPersonId'];
 $addressId = $_POST['hdnAddressId'];
 $firstName = $_POST['txtFirstName'];
 $surname = $_POST['txtSurname'];
 $phoneNumber = $_POST['txtPhone'];
 $mobileNumber = $_POST['txtMobile'];
 $emailAddress = $_POST['txtEmail'];
 $mailingList = $chkMailingList;
 $streetAddress = $_POST['txtStreetAddress'];
 $suburb = $_POST['txtSuburb'];
 $city = $_POST['txtCity'];
 $postcode = $_POST['txtPostcode'];
 $state = $_POST['txtState'];
 $result = $custCon->deleteCustomer($custId);
 if ($result->errorInfo()[2] == null) {
     $addressResult = $addressCon->deleteAddress($addressId);
     if ($addressResult->errorInfo()[2] == null) {
         $personResult = $personCon->deletePerson($personId);
         if ($personResult->errorInfo()[2] == null) {
             $deleteResult = true;
         } else {
             $deleteResult = $personResult->errorInfo()[2];
         }
     } else {
         $deleteResult = $addressResult->errorInfo()[2];
     }
 } else {
     $deleteResult = $result->errorInfo()[2];
 }