Re: Re: passing values of checkboxes in PHP

From: Date: Mon, 17 May 2004 18:38:39 +0000
Subject: Re: Re: passing values of checkboxes in PHP
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-186419@lists.php.net to get a copy of this message
John Taylor-Johnston wrote:
<input type=\"checkbox\" Name=protid1 value=\"$variable\"> <input type=\"checkbox\" Name=protid2 value=\"$variable\"> <input type=\"checkbox\" Name=protid3 value=\"$variable\"> <input type=\"checkbox\" Name=protid4 value=\"$variable\">
Or give all name="protid[]" and you will get array $_POST['protid'] that you can loop over.
Do it like this or you will have the same problem. name="protid[0]" name="protid[1]" name="protid[2]"
Not true.

« previous php.general (#186419) next »