title: action based on drop down selection
body: <p>I want to create a drop-down that will display the list of available rooms based on the type of room selected but the drop down doesn't show any value</p>
  
  <pre><code>&lt;th align=left&gt;ROOM TYPE :&lt;/th&gt;
      &lt;td&gt;
      &lt;?php
          echo "&lt;select name=txttype&gt;";
  
          $qup="select type from tariff where avroom &gt; 0";
          $rs=mysql_query($qup);
  
  
  
          while($res=mysql_fetch_row($rs))
          {
              echo "&lt;option value='".$res[0]."'&gt;".$res[0]."&lt;/option&gt;";
          }
  
  
          echo "&lt;select&gt;";
          echo "&lt;/td&gt;";
  
              ?&gt;
  
  
  &lt;tr&gt;
      &lt;?php
       $type=$_POST["txttype"];\\to be used for the if statement
       $name=$_POST["txtname"];
      ?&gt;
  
      &lt;th align=left&gt;NO OF ROOMS   :&lt;/th&gt;
      &lt;td&gt;&lt;select name=txtroom&gt;
      &lt;?php
      if($_POST["txttype"]=='standard'){
      for($i=1;$i&lt;=avroom;$i++)\\ avroom is the field that contains the no of rooms
      {
          echo "&lt;option value=$i&gt;$i&lt;/option&gt;";
      }
      }
      ?&gt;
  </code></pre>