title: Error in execute method of Prepared SQL statement in PHP?
body: <p>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. </p>
  
  <p><strong>Here is my sql statement :</strong></p>
  
  <pre class="lang-sql prettyprint-override"><code>$req_res = $bdd-&gt;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-&gt;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));
  </code></pre>
  
  <p>And it gaves me an error saying it is <code>PDOException:</code> 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.</p>