At 12:01 PM -0500 10/22/07, Adam Williams wrote:
I have an html page with checkboxes:
form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern MississippiModern
Mississippibr
input type=checkbox name=option[] value=Civil RightsCivil Rightsbr
input type=checkbox
On 10/23/07, tedd [EMAIL PROTECTED] wrote:
At 12:01 PM -0500 10/22/07, Adam Williams wrote:
I have an html page with checkboxes:
form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern MississippiModern
Mississippibr
input type=checkbox name=option[]
On Oct 22, 2007, at 1:01 PM, Adam Williams wrote:
I have an html page with checkboxes:
form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern
MississippiModern Mississippibr
input type=checkbox name=option[] value=Civil RightsCivil
Rightsbr
input
Adam Williams wrote:
I have an html page with checkboxes:
form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern MississippiModern
Mississippibr
input type=checkbox name=option[] value=Civil RightsCivil Rightsbr
input type=checkbox name=option[] value=Military
On 10/22/07, Adam Williams [EMAIL PROTECTED] wrote:
I have an html page with checkboxes:
form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern MississippiModern
Mississippibr
input type=checkbox name=option[] value=Civil RightsCivil Rightsbr
input
On Mon, 2007-10-22 at 18:07 +0100, Stut wrote:
Adam Williams wrote:
I have an html page with checkboxes:
form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern MississippiModern
Mississippibr
input type=checkbox name=option[] value=Civil RightsCivil
Robert Cummings wrote:
On Mon, 2007-10-22 at 18:07 +0100, Stut wrote:
Adam Williams wrote:
I have an html page with checkboxes:
form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern MississippiModern
Mississippibr
input type=checkbox name=option[]
[snip]
print_r($_POST['option']);
it prints nothing.
[/snip]
Try resetting the array first, you may be at the end of the array;
reset($_POST);
print_r($_POST);
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, 2007-10-22 at 12:20 -0500, Adam Williams wrote:
Yeah, thats the problem I'm having for some reason. When I do:
print_r($_POST['option']);
it prints nothing.
It's usually more informative to see everything that was posted so you
might have more of an idea what may have went
Adam Williams a écrit :
I have an html page with checkboxes:
[...]
but I'm getting the error:
you selected:
*Warning*: Invalid argument supplied for foreach() in
*/var/www/sites/mdah-test/museum/mmhsurvey/mailform2.php* on line *81*
I googled some checkbox/foreach pages on google, but I
Robert Cummings wrote:
On Mon, 2007-10-22 at 18:07 +0100, Stut wrote:
Adam Williams wrote:
I have an html page with checkboxes:
form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern MississippiModern
Mississippibr
input type=checkbox name=option[] value=Civil
On 10/22/07, Adam Williams [EMAIL PROTECTED] wrote:
I have an html page with checkboxes:
form action=mailform2.php method=POST
input type=checkbox name=option[] value=Modern MississippiModern
Mississippibr
Change to: input type=checkbox name=option[] value=... /...br/
Someone mentioned
Also, AFAIK, PHP has always thrown a warning or notice if you use
foreach() on a non-associative array. That doesn't mean it won't work,
but the strict standard is apparently:
foreach ($assoc as $key = $val)
not
foreach ($indexed as $item)
However, as we all know, the latter still works fine.
On 10/22/07, Nathan Hawks [EMAIL PROTECTED] wrote:
Also, AFAIK, PHP has always thrown a warning or notice if you use
foreach() on a non-associative array.
PHP arrays are always associative:
cat array.php
#!/usr/bin/env php
?php
error_reporting( E_ALL );
$a = array( 1, 2, 3 );
$b = array(
@lists.php.net Subject: Re:
[PHP] problem with foreach Robert Cummings wrote: On Mon, 2007-10-22 at
18:07 +0100, Stut wrote: Adam Williams wrote: I have an html page
with checkboxes: Modern Mississippi Civil Rights
MilitaryHistory and mailform2.php containing: echo you
selected: ; /* line 81
On Mon, 2007-10-22 at 19:59 -0400, Bastien Koert wrote:
I am sure that I am late to the party, but am sure that
double or single quotes at least are needed around the
attribute values to make this work
Late to the party and completely off the mark taboot. Don't need quotes
at all. It's bad
16 matches
Mail list logo