Hi all, I'm quite a new developer, and I've spent a long time trying to figure out what is causing this error: "SQLSTATE[HY093]: Invalid parameter number: parameter was not defined"
As far as I can tell, all my parameters are defined?
My code is below:
$mySQL_query = "INSERT INTO vd_users (
username,
password,
salt,
pin,
pin_salt,
r_date)
VALUES (
:username,
:password,
:salt,
:pin,
:pin_salt,
:r_date)";
$mySQL_query_parameters = array(
':username' => $_POST['username'],
':password' => $password,
':password_salt' => $password_salt,
':pin' => $pin,
':pin_salt' => $pin_salt,
':r_date' => $datetime
);
try {
$mySQL_statement = $mySQL_connection->prepare($mySQL_query);
$mySQL_result = $mySQL_statement->execute($mySQL_query_parameters);
}
catch(PDOException $mySQL_errors) {
die($mySQL_errors->getMessage();
}
Can anyone help me figure this out?