Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "con.php";
- $name = $_POST['name'];
- $country = $_POST['country'];
- $street = $_POST['street'];
- $postalCode = $_POST['postalCode'];
- $province = $_POST['province'];
- $nameShippment = $_POST['nameShippment'];
- $countryShippment = $_POST['countryShippment'];
- $streetShippment = $_POST['streetShippment'];
- $postalCodeShippment = $_POST['postalCodeShippment'];
- $provinceShippment = $_POST['provinceShippment'];
- $ibanBank = $_POST['ibanBank'];
- $private = $_POST['private'];
- $company = $_POST['company'];
- $pi = $_POST['pi'];
- $cf = $_POST['cf'];
- $phone1 = $_POST['phone1'];
- $phone2 = $_POST['phone2'];
- $email = $_POST['email'];
- $date = $_POST['dateBirthday'];
- $sql = "INSERT INTO customers (
- name,
- country,
- street,
- postalCode,
- province,
- nameShippment,
- countryShippment,
- streetShippment,
- postalCodeShippment,
- provinceShippment,
- ibanBank,
- private,
- company,
- pi,
- cf,
- phone1,
- phone2,
- email,
- dateBirthday) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
- $stmt = $pdo->prepare($sql);
- $stmt->execute([
- $name,
- $country,
- $street,
- $codePostal,
- $province,
- $nameShippment,
- $countryShippment,
- $streetShippment,
- $codePostalShippment,
- $provinceShippment,
- $ibanBank,
- $private,
- $company,
- $pi,
- $cf,
- $phone1,
- $phone2,
- $email,
- $dateBirthday,
- ]);
- echo json_encode('Saved Customer');
- $pdo = null;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement