Jump to content

get id from selected item in dropdown list?


helloise

Recommended Posts

i have the following code:

<td width='100px'>Suppliers

                <select name="supplier">

                    <?php

                      $catcher_id = $service->getCatcherId();

                      $supplier_names = LpmAdnetworkPeer::getByName($catcher_id);

                      foreach($supplier_names as $row)

                      {

                          ?>

                          <option><?php echo $row->getName();

                          ?></option>

                    <?php     

                      }

                    ?>

                </select>

                </td> 

 

then on the same form i have a submit button that takes me to the next form..the problem now is how can i access the ID of the item seleted in the dropdown on the NEXT form please?

i can get the name from the list by $_POST['supplier'] on the next form

thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.