SQLSTATE[42S22]: Column not found: 1054 Unknown column '$value' in 'field list''
<pre><code>try {
    $db = new PDO("mysql:host=$host;dbname=$dbname",$user,$password) ; 
    $db-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

    $formInfo = array('fname','lname','email','password','gender') ;
    $entry = array() ;
    foreach($formInfo as $data) {

     $entry[$data] = $_POST[$data]; 

     }
    //print_r($entry); 


    $salt = Hash::gen_salt() ;
    $sqlcollum = array(
                'First_name'=&gt; $entry['fname'] ,
                'Last_name' =&gt; $entry['lname'] ,
                'email'     =&gt; $entry['email'] ,
                'password'  =&gt; Hash::gen_password($entry['password'],$salt) ,
                'salt'      =&gt; $salt,
                'gender'    =&gt; $entry['gender'] ,
                'date'      =&gt; date('Y-m-d H:i'),
                'groups'    =&gt; '1'
             ) ;
    $sqlKeys = array_keys($sqlcollum) ;
    $sqlValues = array_values($sqlcollum) ;
    $keys = "'".implode("','", $sqlKeys)."'" ;
    $value = "'".implode("','", $sqlValues)."'" ;
    //echo $keys."&lt;br/&gt;" ;
    //echo $value."&lt;br/&gt;" ;


    $db-&gt;beginTransaction() ;

    $insert = $db-&gt;query('INSERT INTO register ($keys) VALUES ($value)') ;

    if($insert) {
        echo "true" ;
    } else {
        $db-&gt;errorCode() ;
        echo "false" ;
    }
   $db-&gt;commit() ;


 } catch(PDOExpection $e) { 
    $db-&gt;rollback() ;
    die($e-&gt;getMessage()) ;
} 
</code></pre>

<p>Why do I get this error?</p>

<blockquote>
  <p>error::Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column '$value' in 'field list'' in register.php:46</p>
</blockquote>