I receive the following error:
Warning: mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement
I am having trouble binding and executing the prepare statement. The connection to the database is succesfully established and it does manage to insert it into the database with the initial value of ?
Below is the code:
// Set up the query
$insert = "INSERT INTO record_user (ip,country,address,stack,skills,employment_type,city_selection,landing_time,submission_time,time_spent)
VALUES ('?','?','?','?','?','?','?','?','?','?')";
// Prepare the statement
$insert = $con->prepare($insert);
// Bind the statement
$insert->bind_param("ssssssssss", $user_ip, $country, $location, $stack, $skills, $employment, $city, $landing_time, $submission_time, $time_spent);
// Execute the statement
$insert->execute();
// Close the statement connection
$insert->close();
// Close the database connection
$con->close();