title: Make PHP read drop down list in HTML form
body: <p>Hey all, I have an HTML form on my website which currently only uses text boxes and a submit button to send to a .php file and then to my email. I'm trying to replace one of these text boxes with a drop down (select, option) menu.</p>
  
  <p>Here is my HTML form:</p>
  
  <pre><code>&lt;form id="ajax-contact-form" action="javascript:alert('success!');"&gt;
  &lt;label&gt;Name:*&lt;/label&gt;&lt;INPUT class="textbox" type="text" name="name" value=""&gt;&lt;br /&gt;
  
  &lt;label&gt;E-Mail:*&lt;/label&gt;&lt;INPUT class="textbox" type="text" name="email" value=""&gt;&lt;br /&gt;
  
  &lt;label&gt;Number Desired:*&lt;/label&gt;&lt;INPUT class="textbox" type="text" name="numberdesired" value=""&gt;&lt;br /&gt;
  
  &lt;label&gt;Message:&lt;/label&gt;&lt;TEXTAREA class="textbox" NAME="message" ROWS="7" COLS="40"&gt;&lt;/TEXTAREA&gt;&lt;br /&gt;&lt;br /&gt;
  
  
  &lt;INPUT class="textbox" type="hidden" name="subject" value="Form Submission" &gt;
  
  &lt;label&gt;Human Verification:*&lt;br /&gt;
  &lt;?=$_SESSION['n1']?&gt; + &lt;?=$_SESSION['n2']?&gt; =&lt;/label&gt;&lt;input type="text" name="captcha" id="captcha" /&gt;&lt;br /&gt;
  
  
  &lt;label&gt;&amp;nbsp;&lt;/label&gt;&lt;INPUT class="button" type="submit" name="submit" value="Send Message"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here is the php file that it sends to:</p>
  
  <pre><code>&lt;?php
  /*
  Credits: Bit Repository
  URL: http://www.bitrepository.com/
  */
  
  include 'config.php';
  
  session_name("fancyform");  /* starting the session */
  session_start();
  
  
  $post = (!empty($_POST)) ? true : false;
  
  if ($post) {
      include 'functions.php';
  
      $email = trim($_POST['email']);
      $name = stripslashes($_POST['name']);
      $subject = stripslashes($_POST['subject']);
      $captcha = stripslashes($_POST['captcha']);
      $numberdesired = stripslashes($_POST['numberdesired']);
      $message = stripslashes($_POST['message']);
  
      $error = '';
  
      // Check name
      if (!$name) {
          $error .= 'Please enter your name.&lt;br /&gt;';
      }
  
      // Check email
      if (!$email) {
          $error .= 'Please enter an e-mail address.&lt;br /&gt;';
      }
  
      if ($email &amp;&amp; !ValidateEmail($email)) {
          $error .= 'Please enter a valid e-mail address.&lt;br /&gt;';
      }
  
      if (!$numberdesired) {
          $error .= 'Please enter the number desired.&lt;br /&gt;';
      }
  
      if ((int)$_POST['captcha'] != $_SESSION['expect'])
          $error .= 'Wrong verification number.';
  
      //Send the Name, Email, and Message in a formated version.
      $email_message = "The following message was sent to you from....\n\n";
  
      function clean_string($string) {
          $bad = array("content-type","bcc:","to:","cc:","href");
          return str_replace($bad,"",$string);
      }
      $email_message .= "Email: ".clean_string($email)."\n";
      $email_message .= "Gamertag: ".clean_string($name)."\n";
      $email_message .= "Credits Desired: ".clean_string($numberdesired)."\n";
      $email_message .= "Message: ".clean_string($message)."\n";
  
      if (!$error)    {
          $mail = mail(WEBMASTER_EMAIL, $subject, $email_message,
              "From: ".$name." &lt;".$email."&gt;\r\n"
              ."Reply-To: ".$email."\r\n"
              ."X-Mailer: PHP/" . phpversion());
  
          if ($mail) {
              echo 'OK';
          }
      }
      else {
          echo '&lt;div class="notification_error"&gt;'.$error.'&lt;/div&gt;';
      }
  }
  ?&gt;
  </code></pre>
  
  <p>Now I'm fairly new at PHP. I don't think the 'stripslashes' will read a drop down menu. Is there something else I can use?</p>