Why cant you use square brackets??
call all your checkboxes the following:
interesting_area[]
Then post it to whatever page, now all the checkboxes that were checked are
held in a array (interesting_area)
To see what is contained in the array, do the following:
<?php
echo "<pre>";
print_r($_POST[interesting_area]);
echo "</pre>";
?>
>From here it depends on what you want to do with the data..
You can loop through the array, using for(), foreach() or while(), or
alternatively write a function to manipulate the data.
Hope that helps,
Craig
"Alex Shi" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How to ontain data from a group of checkbox using same name?
> For example, in a form there're 6 checkboxes and all named as
> "Interesting_Area". I know if put a pairs of square brackets at the
> end of the name then in php all the values of them can be ontained.
> However, for some reason I cannot use square brackets. Please
> help me out if anyone know how to do the trick. THanks!
>
> Alex
>
>
> --
> ---------------------------
> TrafficBuilder Network:
> http://www.bestadv.net/index.cfm?ref=7029
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php