Re: [PHP] php + javascript hard day together ?

2002-07-13 Thread Jason Wong

On Saturday 13 July 2002 23:37, David D wrote:
> Hi all,
>
> I can manage this script to work.
> Js warn about listid[], he doesnt like [] in a var name !

There's nothing you can do about that.

> Php needs them to collect an array from form checkboxes.

You'll just have to rename your checkboxes to something like listid_1, 
listid_2 etc. Then loop:

  # Untested code, use with caution

  for ($i = 1; $i < $number_of_checkboxes; $i++) {
if (isset($_GET["listid_$i"])) {
  echo "listid_$i is checked";
}
  }


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Bunker's Admonition:
You cannot buy beer; you can only rent it.
*/


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




Re: [PHP] php + javascript hard day together ?

2002-07-13 Thread David D

I hack js no need to change in php :