View Single Post
Old 10-05-2012, 09:12 PM   PM User | #5
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,556
Thanks: 62
Thanked 4,055 Times in 4,024 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
On the other hand, if you really *MUST* pass all 3 values--or if, for example,you don't want to even use the DB on the next page--then you can do this:
Code:
    while ($rows = mysql_fetch_assoc($plane_result)) { 
        $plane_name = $rows["plane_name"]; 
        $plane_id = $rows["id"]; 
        $seating_amount = $rows['seating_amount']; 
        $item = $plane_id . "##" . $plane_name . "##" . $seating_amount;
        echo '<option value="' . $item . '">' . $plane_name . "</option>\n"; 
    }
That puts all three values into the <option> value and, on the next page, if you do
Code:
$item = $_POST["item"];
then you can split (explode, I think, in PHP terms?) on the ## to get the 3 separate values.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote