PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
bg
Forum Contributor
Posts: 157 Joined: Fri Sep 12, 2003 11:01 am
Post
by bg » Tue Jan 27, 2004 4:02 pm
How do you use form arrays that have been passed via GET?
For example, I have an array on the form arr_property_type[] (defined as such in the input tag) consisting of check boxes.
Does php treat $_GET['arr_property_type'] as an array, or is there something special you need to do? Thanks,
Brian
markl999
DevNet Resident
Posts: 1972 Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)
Post
by markl999 » Tue Jan 27, 2004 4:18 pm
Does php treat $_GET['arr_property_type'] as an array
Yep, same as POST.
DuFF
Forum Contributor
Posts: 495 Joined: Tue Jun 24, 2003 7:49 pm
Location: USA
Post
by DuFF » Tue Jan 27, 2004 4:21 pm
Code: Select all
<?php
foreach($_GET['checkbox'] as $value) {
echo "You clicked a checkbox with the value: " . $value"<br />\n";
}
?>