title: How to get data from Select option to php?
body: <p>I have created a simple page which will be displayed after logging in. From that page, I print my html code in it with the SELECT option for the user to select the items they needed.</p>
  
  <p>This is the code.</p>
  
  <pre><code>&lt;?php  //Start the Session
  session_start();
  require('connect.php');
  
  if (isset($_POST['email']) and isset($_POST['password'])){
  
  
  $username = $_POST['email'];
  $password = $_POST['password'];
  
  $query = "SELECT * FROM `user` WHERE email='$username' and password='$password'";
  $result = mysql_query($query) or die(mysql_error());
  $count = mysql_num_rows($result);
  
  if ($count == 1){
  $_SESSION['email'] = $username;
  
  print '
  &lt;html&gt;
  &lt;body&gt;
  &lt;br&gt;
  &lt;form action="" method="POST"&gt;
  Shirt:
  &lt;select name="shirt_string"&gt;
      &lt;option value=" "&gt; &lt;/option&gt;
      &lt;option value="Long Sleeves"&gt;Long Sleeves&lt;/option&gt;
      &lt;option value="Short Sleeves"&gt;Short Sleeves&lt;/option&gt;
      &lt;option value="T-Shirt"&gt;T-Shirt&lt;/option&gt;
      &lt;option value="Singlet"&gt;Singlet&lt;/option&gt;
  &lt;/select&gt; &lt;/br&gt;
  &lt;br&gt;
  Pants:
  &lt;select name="pants_string"&gt;
      &lt;option value=" "&gt; &lt;/option&gt;
      &lt;option value="Dress pants"&gt;Dress pants&lt;/option&gt;
      &lt;option value="Shorts"&gt;Shorts&lt;/option&gt;
      &lt;option value="Jeans"&gt;Jeans&lt;/option&gt;
      &lt;option value="Chinos"&gt;Chinos&lt;/option&gt;
  &lt;/select&gt; &lt;/br&gt;
  &lt;br&gt;
  Shoes:
  &lt;select name="shoes_string"&gt;
      &lt;option value=" "&gt; &lt;/option&gt;
      &lt;option value="Dress shoes"&gt;Dress shoes&lt;/option&gt;
      &lt;option value="Slipper"&gt;Slipper&lt;/option&gt;
      &lt;option value="Sneakers"&gt;Sneakers&lt;/option&gt;
      &lt;option value="Track shoes"&gt;Track shoes&lt;/option&gt;
  &lt;/select&gt; &lt;/br&gt;
  &lt;br&gt;
  &lt;input type="submit"&gt;
  &lt;br/&gt;
  &lt;br/&gt;
  &lt;a href="login.php?action=logout"&gt;Log out&lt;/a&gt;
  
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  ';
  echo $_POST['pants_string'];
  }
  else
  {
      echo "Invalid Login Credentials.";
  }
  }
  
  if (isset($_SESSION['email'])){
  $username = $_SESSION['email'];
  
  }else{}
  
  
  echo "&lt;br /&gt;\n";
  $now = new DateTime();
  $Singapore = new DateTimeZone('Asia/Singapore');
  $now-&gt;setTimezone($Singapore);
  echo $now-&gt;format('F j, Y h:ia');
  
  ?&gt;
  </code></pre>
  
  <p>From the above codes, how am I supposed to get the value from the SELECT option to php?</p>
  
  <p>I tried calling something like $_POST['pants_strings']; but it does not work.</p>
  
  <p>EDIT: This is the full code.</p>