Re: list only checkbox-marked records on a new page
| From: | Richard Lynch | Date: | Fri, 16 Feb 2001 01:13:49 +0000 |
| Subject: | Re: list only checkbox-marked records on a new page | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40045@lists.php.net to get a copy of this message | ||
<input type=checkbox name=marked[] value=1 ></TD>...
<input type=checkbox name=marked[] value=2 ></TD>...
<input type=checkbox name=marked[] value=3 ></TD>...
The user shall mark interesting records and upon submitting the form shall
be shown on a new page showing only the marked records.
<?php
$where = '';
if (isset($marked)){
$ids = array();
while (list(,$id) = each($marked)){
$ids[] = $id;
}
$where = "where id in (" . implode(', ', $ids) . ") ";
}
$query = "select blah, blah, blah from whatsit $where ";
?>
--
Visit the Zend Store at http://www.zend.com/store/
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm