Jump to content

Displaying result of drop down list selection


Darkmatter5

Recommended Posts

If I have this dropdown list

 

<select name='client' method'get'>
<option value='1'>John</option>
<option value='2'>Joe</option>
<option value='3'>Bill</option>
</select

 

I know the values of each selection are the value parameter in the <option> tag.  But say I want to display or simply get the value of the option selected.  Would I do something like this?  $_GET["client"]

 

Thanks!

*EDIT*

Um.....your select doesn't make sense. you need to put the method in the form tag.

*/EDIT*

either you can

<?php
print $_POST['client'];
?>

or

<?php
echo $_POST['client'];
?>

assuming your form method is POST

which ever you like. I'm an old school print guy.

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.