How to view the data by using ListBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vanz10
    New Member
    • Jan 2007
    • 3

    #1

    How to view the data by using ListBox

    I everyone, i'm a bigenner when talking about php so that is why I'm asking someone who knows the code if how to view the data by using listbox
  • yesno2smokin
    New Member
    • Dec 2006
    • 1

    #2
    hello vanz10 ,

    why don't you post your whole problem on this forum... so that we know where you are experiencing difficulty in.

    Comment

    • joshmani
      New Member
      • Jan 2007
      • 1

      #3
      hello vanz10 ,

      try this....it may help u.

      <html>
      <head>

      <title>Untitl ed Document</title>
      </head>

      <body>
      <form name="form1" method="post" action="chk.php ?act=post">
      <select name="fam" >
      <option value="1">MALE</option>
      <option value="2">Femal e</option>
      <option value="3">kIDS</option>
      <option value="4">hai</option>
      </select>
      <input name="SUB" type="submit" value="go">

      </form>
      <?

      if($_REQUEST['act']=="post")
      {
      $s=$_REQUEST['fam'];
      if($s==1)
      {
      echo "male";

      }
      else if($s==2)
      {
      echo "female";

      }
      else if($s==3)
      {
      echo "kids";

      }
      else
      {
      echo "hai";
      }
      }

      ?>
      </body>
      </html>

      Comment

      Working...