My program is supposed to insert a bunch of data into a customer table but after the program runs, nothing is added to the table. It isn't giving any errors either so I'm confused as to what I have wrong. I've inserted data into a table multiple times before and have never had this issue.
Code:
//fetch Service Form inputs
$fname = filter_input(INPUT_GET, 'fname');
$lname = filter_input(INPUT_GET, 'lname');
$name = $fname . " " . $lname;
$city = filter_input(INPUT_GET, 'city');
$state = filter_input(INPUT_GET, 'state');
$zip = filter_input(INPUT_GET, 'zip');
$phone = filter_input(INPUT_GET, 'phone');
$email = filter_input(INPUT_GET, 'email');
$custNum = filter_input(INPUT_GET, 'custNum');
$vehNum = filter_input(INPUT_GET, 'vehNum');
//perform update
require_once('../db_connect.php');
//Insert values for Customer
$queryCustomer = 'INSERT INTO customer
(CUST_NUM, VEH_NUM, CUST_NAME, CUST_CITY, CUST_STATE, CUST_ZIP, CUST_PHONE, CUST_EMAIL)
VALUES
(:custNum, :vehNum, :name, :city, :state, :zip, :phone, :email)';
$statement3 = $db1->prepare($queryCustomer);
$statement3->bindValue(':custNum', $custNum);
$statement3->bindValue(':vehNum', $vehNum);
$statement3->bindValue(':name', $name);
$statement3->bindValue(':city', $city);
$statement3->bindValue(':state', $state);
$statement3->bindValue(':zip', $zip);
$statement3->bindValue(':phone', $phone);
$statement3->bindValue(':email', $email);
$statement3->execute();
$statement3->closeCursor();
I've tested all the values being inserted and they are all being obtained without any issues.
Any help is appreciated. Let me know if I should include anything else.