title: Store option from drop down menu into database
body: <p>I have the following form field in my html code:</p>
  
  <pre><code>&lt;select class="secret_question"&gt;
                       &lt;option value ="1"&gt;The name of the city where you were born&lt;/option&gt;
                       &lt;option value ="2"&gt;The name of your first pet&lt;/option&gt;
                       &lt;option value ="3"&gt;What is your mother's maiden name&lt;/option&gt;
                    &lt;/select&gt;
  </code></pre>
  
  <p>Question: How to I store the selected option into the database. I have been able to store normal fields  like a name, email-id into a database with the following code :</p>
  
  <pre><code>$firstname = $_REQUEST['firstname'];
      $lastname = $_REQUEST['lastname'];
  $stmt = $dbh-&gt;prepare("INSERT INTO users (firstname,lastname) VALUES ('$firstname', '$lastname')");
  </code></pre>
  
  <p>I have tried the same technique for the select list but it gives me the <code>"undefined index"</code> error </p>