Re: php + javascript hard day together ?
| From: | Jason Wong | Date: | Sat, 13 Jul 2002 16:21:33 +0000 |
| Subject: | Re: php + javascript hard day together ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107523@lists.php.net to get a copy of this message | ||
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<br>";
}
}
--
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.
*/