title: Insert password hash using PDO Prepared Statements
body: <p>In a basic mysql insert you are able to set a password variable 'PASSWORD($password)' but this breaks a PDO statement. </p>
  
  <p>How do you hash the password while using pdo::prepare and pdo::execute? </p>
  
  <pre><code>$sql= "INSERT INTO contractors (userid, password, name) VALUES ('$userid', '$pass1', '$name')";
  $result = $dbh-&gt;prepare($sql);
  $count = $result-&gt;execute();
  
  Echo $count."&lt;br&gt;";
  </code></pre>
  
  <p>I am such a n00b, a simple registration page has taken me two days. Kindergarten answers are welcomed. </p>
  
  <p>thanks, </p>