Access values of a group of select boxes in php from post

Posted by 2Real on Stack Overflow See other posts from Stack Overflow or by 2Real
Published on 2010-05-31T03:19:13Z Indexed on 2010/05/31 3:22 UTC
Read the original article Hit count: 250

Filed under:
|
|
|

Hi, I'm new to PHP, and I can't figure this out.

I'm trying to figure out how to access the data of a group of select boxes I have defined in my HTML code. I tried grouping them as a class, but that doesn't seem to work... maybe I was doing it wrong.

This is the following HTML code.

<form action="" method="post">
<select class="foo">
 <option> 1.....100</option>
</select>
<select class="foo">
 <option> 1.... 500></option>
</select>
<input type="submit" value="Submit" name="submit"/>
</form>

I essentially want to group all my select boxes and access all the values in my PHP code.

Thanks

© Stack Overflow or respective owner

Related posts about php

Related posts about html