View Single Post
 
Old May 18th, 2004, 12:33 PM
richard.york's Avatar
richard.york richard.york is offline
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Are you talking about <select> fields? There is nothing special that you have to do to access the value.

<form action='page.php' method='post'>
    <select name='question'>
        <option value='1'>Yes</option>
        <option value='0'>No</option>
    </select>
</form>

This will be available in page.php as $_POST['question'], and additionally as $question if the php.ini directive register_globals has a value of 'On'.

If this were an <input> text field the variable would be the same.


Regards,
Rich

::::::::::::::::::::::::::::::::::::::::::
The Spicy Peanut Project
http://www.spicypeanut.net
::::::::::::::::::::::::::::::::::::::::::