So i am very new to Mysqli and have this code (see below) and i think it's all done correctly but for some reason it's not inserting anything into the database and i can't figure out why. I've followed tutorials online and read examples online but i feel like mine looks the same. I've added the htmlentities and strip_tags because i'm trying to make the website as secure as possible and i'm sure i can use a function instead of repeatedly writing all of that but i'm not 100% sure how to use functions so stuck with what i know. If there is anyone that understands what i mean and is able to point out where i've messed up i'd really appreciate it. I know this is a dumb question but i just don't know where else to look.
if (isset($_POST['eventAdd'])) {
$stmt = $dbLink->prepare("INSERT INTO `db744544270`.`customerInterest` (`id`, `salutation`, `firstName`, `lastName`, `contactNumber`, `contactEmail`, `contactAddress1`, `contactAddress2`, `contactAddressCity`, `contactAddressState`, `contactAddressPostcode`, `contactAddressCountry`, `carInterest`, `enquiryType`, `brochureStatus`, `testDriveDate`, `eventName`, `addedBy`, `addedByJob`, `soldStatus`) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
$stmt->bind_param($sal, $firstName, $lastName, $tele, $email, $add1, $add2, $city, $state, $postCode, $country, $cInterest, $eType, $testDriveDate, $eName);
$sal = $_POST['sal'];
$sal = htmlentities($sal);
$sal = strip_tags($sal);
$firstName = $_POST['firstName'];
$firstName = htmlentities($firstName);
$firstName = strip_tags($firstName);
$lastName = $_POST['lastName'];
$lastName = htmlentities($lastName);
$lastName = strip_tags($lastName);
$tele = $_POST['tele'];
$tele = htmlentities($tele);
$tele = strip_tags($tele);
$email = $_POST['email'];
$email = htmlentities($email);
$email = strip_tags($email);
$add1 = $_POST['add1'];
$add1 = htmlentities($add1);
$add1 = strip_tags($add1);
$add2 = $_POST['add2'];
$add2 = htmlentities($add2);
$add2 = strip_tags($add2);
$city = $_POST['city'];
$city = htmlentities($city);
$city = strip_tags($city);
$state = $_POST['state'];
$state = htmlentities($state);
$state = strip_tags($state);
$postCode = $_POST['postCode'];
$postCode = htmlentities($postCode);
$postCode = strip_tags($postCode);
$country = $_POST['country'];
$country = htmlentities($country);
$country = strip_tags($country);
$cInterest = $_POST['cInterest'];
$cInterest = htmlentities($cInterest);
$cInterest = strip_tags($cInterest);
$eType = $_POST['eType'];
$eType = htmlentities($eType);
$eType = strip_tags($eType);
$testDriveDate = $_POST['testDriveDate'];
$testDriveDate = htmlentities($testDriveDate);
$testDriveDate = strip_tags($testDriveDate);
$eName = $_POST['eName'];
$eName = htmlentities($eName);
$eName = strip_tags($eName);
$stmt->execute();
echo "<br>Sal: ".$sal;
echo "<br>Name: ".$firstName;
echo "<br>Last Name: ".$lastName;
echo "<br>1: ".$tele;
echo "<br>1: ".$email;
echo "<br>1: ".$add1;
echo "<br>1: ".$add2;
echo "<br>1: ".$city;
echo "<br>1: ".$state;
echo "<br>1: ".$postCode;
echo "<br>1: ".$country;
echo "<br>1: ".$cInterest;
echo "<br>1: ".$eType;
echo "<br>1: ".$testDriveDate;
echo "<br>1: ".$eName;
echo "<br><br>Testing Query:<br>";
printf("%d Row inserted.
", mysqli_stmt_affected_rows($stmt));
echo "<br>Testing: ".var_dump($stmt);
$stmt->close();
}