I have read all the topics on this error:
exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: parameter was not defined
but can't seem to find where I went wrong.
My code:
$pdo->executePrepared([
"query"=> "UPDATE users SET studie = :studie, studieland = :studieland, typestudie = :typestudie,
jaaropleiding = :jaaropleiding, onderwijsinstelling = :onderwijsintelling,
biografie = :biografie, voornaam = :voornaam, achternaam = :achternaam,
geslacht = :geslacht, geboortedatum = :geboortedatum WHERE userid = :userid LIMIT 1",
"params"=>[
":studie"=> addslashes($studie_correct),
":studieland"=> $_POST['studieland'],
":typestudie"=> $typestudie,
":jaaropleiding"=> $_POST['jaaropleiding'],
":onderwijsinstelling"=>addslashes($_POST['onderwijsinstelling']),
":biografie"=> addslashes($_POST['biografie']),
":voornaam"=> addslashes($_POST['voornaam']),
":achternaam"=> addslashes($_POST['achternaam']),
":geslacht"=> $_POST['geslacht'],
":geboortedatum"=> $_POST['geboortedatum'],
":userid"=> $userid
]
]);
All of the parameters have a value so they are all defined.
I have done a lot of these kind of statements and they all went just fine, but I can't figure out what is wrong here.
Any help is appreciated.