Re: counting check boxes

From: Date: Sat, 10 May 2003 18:52:16 +0000
Subject: Re: counting check boxes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147137@lists.php.net to get a copy of this message
Maybe use different var names for your checkboxes? id will always = 1100 given the get string that you show, or it will always = the last occurrence of id= in the get string. Could use name="cb1" thru name="cb5" Your query string looks odd as well. -Shawn "Ryan A" <ryan@jumac.com> wrote in message news:000901c31722$ec5869d0$1701400a@l2zcaxu7emppqh... > Hi, > I have run into a little problem, its hard to explain so am giving you the > whole code below: > I am getting a string to countchecks.php which is like: > countchecks.php?id=154&id=198&id=505&id=809&id=1100 > > taking that I have to format it into > > select * from asdf where id=154 and id=198 and id=505 and id=809 and > id=1100; > > How can i do that? > > Below is the form that i am using... > > (to make the code easy to read i renamed "checkbox" to "id" above) > > > <form name="form1" method="get" action="countchecks.php"> > <table width="71%" border="1" cellspacing="2" > cellpadding="1"> > <tr> > <td width="20%"><input type="checkbox" > name="checkbox" > value="154"></td> > <td width="80%">154</td> > </tr> > <tr> > <td><input name="checkbox" type="checkbox" > id="checkbox" > value="198"></td> > <td>198</td> > </tr> > <tr> > <td><input name="checkbox" type="checkbox" > id="checkbox" > value="202"></td> > <td>202</td> > </tr> > <tr> > <td><input name="checkbox" type="checkbox" > id="checkbox" > value="505"></td> > <td>505</td> > </tr> > <tr> > <td><input name="checkbox" type="checkbox" > id="checkbox" > value="809"></td> > <td>809</td> > </tr> > <tr> > <td><input name="checkbox" type="checkbox" > id="checkbox" > value="1100"></td> > <td>1100</td> > </tr> > <tr> > <td><input type="submit" name="Submit" value="Submit > form"></td> > <td>&nbsp;</td> > </tr> > </table></form> > > > Kindly help. > > Cheers, > -Ryan >

« previous php.general (#147137) next »