I am trying to insert some values in user table using SQL prepared statement, but it doesn't work. I tried for hours to verify the syntax and number of arguments and still doesn't work.
Here is my sql statement :
$req_res = $bdd->prepare('INSERT INTO users(grade, name, fname, email, pass,telephone, code, adresse, city, id_groupe, level,status,info, img,datetime1, time1, token, valide,country, n) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,NOW(),?,?,1,?,?)');
$req_res->execute(array($grade, $name,$fn, $email, sha1($pass),$tel, $code, $adresse, $id_city, $id_groupe, $level, $status, $save_path2.$fichier2, $save_path.$fichier1,time(), $token, $country,$n));
And it gaves me an error saying it is PDOException:
and the error happend in the execute method but I can't figure out what it is. I hope someone can Help me I will appreciate it very much.