title: Insert statement not working using execute(array()) of PDO Extension
body: <pre><code> $stmt = $conn-&gt;prepare("INSERT INTO user VALUES ('',:username,md5(:password),'',1,'','',:email,'',0,0,'',:cover,:dateofbirthYear:dateofbirthMonth:dateofbirthDay,NOW(),:sex,:country)");
   $stmt-&gt;execute(array(
    ':username'   =&gt; $username,
    ':password' =&gt; $password,
    ':email'   =&gt; $email,
    ':cover' =&gt; $cover,
    ':dateofbirthYear'   =&gt; $dateofbirthYear,
    ':dateofbirthMonth' =&gt; $dateofbirthMonth,
    ':dateofbirthDay'   =&gt; $dateofbirthDay,
    ':sex' =&gt; $sex,
    ':country'   =&gt; $country 
      ));
  </code></pre>
  
  <p>For some reason this insert statement is not working. I am very new in PDO so I do not know much about it. What am I doing wrong?</p>
  
  <p>this statment gives me this error :</p>
  
  <blockquote>
    <p>Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens' in /home/manga/public_html/new/register.php:80 Stack trace:<br>
    #0 /home/manga/public_html/new/register.php(80): PDOStatement->execute(Array)<br>
    #1 {main} thrown in /home/manga/public_html/new/register.php on line 80</p>
  </blockquote>