try this (noticed that I've changed $foo to $_POST["foo"]. after all we're
livin in globals off rite? )

<?
if ($_POST["submit"]) {
    print "submitted<BR>";
    for($i=0;$i<sizeof($_POST["foo"]);$i++) {
        print $_POST["foo"][$i]."<BR>";
    }
}
else {
?>
<form action="<? echo $_SERVER["PHP_SELF"] ?>" method="post">
  <input type="checkbox" name="foo[]" value="one">One
  <input type="checkbox" name="foo[]" value="two">Two
  <input type="checkbox" name="foo[]" value="three">Three
  <input type="submit" value="submit" name="submit">
</form>
<?
}
?>

--
roger


--- "John W. Holmes" <[EMAIL PROTECTED]> wrote:
> > dear all,
> > i ran my code below on ie and it works. but when i use netscape 4.76
> under
> > linux, i only get the
> > message "submitted" even though i've checked some fields.
> 
> The code is running on the same box, right? Just accessing it with
> different browsers?
>  
> > what do i need to add to make it work with netscape under linux?
> > code follows:
> > 
> > <?
> > if ($_POST["submit"]) {
> >     print "submitted<BR>";
> >     for($i=0;$i<sizeof($foo);$i++) {
> >         print "$foo[$i]<BR>";
> >     }
> > }
> > else {
> > ?>
> > <form action=<? echo $_SERVER["PHP_SELF"] ?> method=post>
> >   <input type=checkbox name=foo[] value=one>One
> >   <input type=checkbox name=foo[] value=two>Two
> >   <input type=checkbox name=foo[] value=three>Three
> >   <input type=submit value=submit name=submit>
> > </form>
> 
> Try putting quotes (") around your types, names, and values in your
> input elements. Netscape may not recognize foo[] as a proper name
> without the quotes and send the data incorrectly.
> 
> ---John Holmes...
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__________________________________________________
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos & More
http://faith.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to