On Friday 31 January 2003 11:40, Matt Palermo wrote:
> Thanks. I tried that, and maybe I am doing something wrong with it, but
> it didn't work. What I did was I made a counter variable, $counter and
> put it outside the while loop. Then, inside the while loop, when it
> makes a checkbox, I named the check box, $CheckBox[$counter], so that it
^^^^^^^^^
That should be CheckBox and not $CheckBox (that latter, as per your code, is
undefined and is empty).
> would put it at that spot in an array. Then on the following page
> (which the variables get posted to) I created a for loop to output all
> the values of $CheckBox[]. I made the loop from 0 to < $counter, and it
> still doesn't output anything.
*********************************************
* "If in doubt, print everything out" (TM). *
*********************************************
print_r($GLOBALS) should give you all you need to know.
Or more specifically, to find out what values your forms are returning you can
use:
print_r($_POST)
or
print_r($_GET)
depending on the 'method' that your form uses.
And whilst we're on the subject, you don't seem to have any <form> tags? Some
browsers (quite rightly) ignore form elements if there are no <form> tags.
> Do I need to initialize the $CheckBox
> array or something, if so, how do I do it?
No.
> Here is the modified code
> that I used for this:
[snip]
> <input type='checkbox' name='$CheckBox[$counter]' value='ON'></td>
That should be:
... name='CheckBox[$counter]' ...
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
1 1 was a race-horse, 2 2 was 1 2. When 1 1 1 1 race, 2 2 1 1 2.
*/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php