GetNextCustomerId(); $name = $_POST['name']; $addr = $_POST['addr']; $phone = $_POST['phone']; $email = $_POST['email']; $customer = new Customer($id, $name, $addr, $phone, $email); try { $p->SaveCustomer($customer); $log->info("Customer $id saved"); $status = "Customer $id saved"; } catch(PDOException $ex) { $log->error('save customer failed with: ' . $ex->getMessage()); $status = "Save failed"; } header('location: ../Presentation/addcustomer_form.php?status=' . urlencode($status)); ?>