$_POST in PHP, need help with the code - Page 2
Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: $_POST in PHP, need help with the code

  1. #11
    Senior Member
    Join Date
    Apr 2004
    Posts
    228
    zENGER No offence but I didn't understand most of the stuff you said. I've been using PHP for a couploe of weeks now, but I'm not that good with it.
    Don\'t post if you\'ve got nothing constructive to say. Flooding is annoying

  2. #12
    Just Another Geek
    Join Date
    Jul 2002
    Location
    Rotterdam, Netherlands
    Posts
    3,403
    Look at the example I gave (the link).

    You need to get something like (watch the bolded stuff):

    Code:
    <select name=destination>
    <?
    
    fireSQLquery("SELECT Destination_ID, Destination_Name FROM destinations;");
    
    while (there are rows) 
    {
      // get one row as $Dest_ID, $Dest_name
      echo "<option value='$Dest_ID'>$Dest_name</option>"
    }
    ?>
    </select>
    
    <?
    
     $selected_dest_id = $_POST["destination"];
     // do something with $selected_dest_id
    
    ?>
    Oliver's Law:
    Experience is something you don't get until just after you need it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 Security News

     Patches

       Security Trends

         How-To

           Buying Guides