o 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..
>
>
blah1
> &nbps;
blah2
>
bl
Hi Adam:
On Wed, Jun 12, 2002 at 01:15:03PM -0700, Adam Plocher wrote:
> blah3
>
> $groups[] = $_POST['groups[]'];
This is just wrong.
> $groups[] = $_POST['groups'];
This assigns the global groups array to one element in a local groups
array. So, if you then do the following, you'd see
$groups = $_POST['groups'];
or
if(isset($_POST['groups']) && is_array($_POST['groups']))
$groups = $_POST['groups'];
else
$groups = array();
so that groups is an (empty) array even if no checkboxes were checked
mh.
On Wed, 12 Jun 2002, Adam Plocher wrote:
> blah1
> &nbps; blah2
> bl
blah1
&nbps; blah2
blah3
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
4 matches
Mail list logo