counting check boxes
| From: | Ryan A | Date: | Sat, 10 May 2003 18:35:25 +0000 |
| Subject: | counting check boxes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-147135@lists.php.net to get a copy of this message | ||
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> </td>
</tr>
</table></form>
Kindly help.
Cheers,
-Ryan