$_POST['groups'] is an array. It's size is going to be dependant on how many check boxes were checked.
So, in your example, if only blah2 is selected, you'll have $_POST['groups'][0] == '2' You can use count($_POST['groups']) to see how many boxes were checked. ---John Holmes... > -----Original Message----- > From: Adam Plocher [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, June 12, 2002 4:15 PM > To: [EMAIL PROTECTED] > Subject: [PHP] POST Arrays with register globals.. > > <input type="checkbox" name="groups[]" value="1" checked> blah1<br> > <input type="checkbox" name="groups[]" value="2" checked>&nbps; blah2<br> > <input type="checkbox" name="groups[]" value="3" checked> blah3<br> > > I can't seem to access that data correctly when that form gets submitted. > > I have tried: > > $groups[] = $_POST['groups[]']; > and > $groups[] = $_POST['groups']; > > no luck.. > > Can somebody please give me a hand, thanks a lot. > > -Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php