I have this form and I can’t get it to post to my sql database?
https://xcanberracars.com/assets/booking/bookride_bu240118.php
This is the code I believe I have everything right but obviously not.
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE|E_WARNING));
$host="localhost";
$dbuser="xcanberr_accountmanager";
$dbpass="*********”;
$dbname="xcanberr_PromoCodes";
$link = mysqli_connect($host, $dbuser, $dbpass,$dbname);
if(!$link)
{
echo "ERROR| Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
$booking_id = "XBR".date("dmYHis");
$sql = "INSERT INTO booking_table (bookingID, first_name, last_name, email, phone, pickup_location, drop_location)
VALUES ('$bookingId', '$firstName', '$lastName', '$email', '$phone,'$pickupAddressLine1', '$dropAddressLine1')";
mysqli_query($conn, $sql);
I can get it to work on my local host pc but won’t work on the server