inserting variable into table
<p>I am able to generate the activation_key in the following code. But I can't manage to insert it into the table. Blank value gets inserted into the table.
What am I doing wrong? (using PEAR text password and other extensions)</p>

<pre><code>                $activation_key = Text_Password::createFromLogin($data['email'], 'rot13');
                $sql = "INSERT INTO auth (firstname, lastname,gender,dob,mobileno,landlineno,addressline1,addressline2,addressline3,country,state,city,pincode,email,username,password,question,answer,activation_key)
                VALUES ('" . $db-&gt;escapeSimple($data['firstname']) . "','"
                                    . $db-&gt;escapeSimple($data['lastname'])."','"
                                    . $db-&gt;escapeSimple($data['gender'])."','"
                                    . $db-&gt;escapeSimple($data['dob'])."','"
                                    . $db-&gt;escapeSimple($data['mobileno'])."','"
                                    . $db-&gt;escapeSimple($data['landlineno'])."','"
                                    . $db-&gt;escapeSimple($data['address1'])."','"
                                    . $db-&gt;escapeSimple($data['address2'])."','"
                                    . $db-&gt;escapeSimple($data['address3'])."','"
                                    . $db-&gt;escapeSimple($data['country'])."','"
                                    . $db-&gt;escapeSimple($data['state'])."','"
                                    . $db-&gt;escapeSimple($data['city'])."','"
                                    . $db-&gt;escapeSimple($data['pin'])."','"
                                    . $db-&gt;escapeSimple($data['email'])."','"
                                    . $db-&gt;escapeSimple($data['username'])."','"
                                    . md5($db-&gt;escapeSimple($data['pwd']))."','"
                                    . $db-&gt;escapeSimple($data['question'])."','"
                                    . $db-&gt;escapeSimple($data['answer']). "', '"
                                    . $db-&gt;escapeSimple($data['activiation_key'])."')";
          $db-&gt;query($sql);
</code></pre>
