yeah yeah...it's damn near 4 in the morning here...my brain isn't exactly on at the moment. :) On Wed, 18 Aug 2004 11:35:59 +0100, Ford, Mike [LSS] <m.ford@xxxxxxxxxxxxxx> wrote: > On 18 August 2004 11:24, randy wrote: > > > $chkboxes = $_POST['ch']; > > $sql = 'SELECT '; > > foreach($chkboxes as $k => $v) > > { > > $sql .= $v; > > if($k < (sizeof($chkboxes) - 1)) > > { > > $sql .= ', '; > > } > > } > > $sql .= ' FROM form'; > > $sql = 'SELECT ' . implode(', ', $chkboxes) . 'FROM form'; > > Cheers! > > Mike > > --------------------------------------------------------------------- > Mike Ford, Electronic Information Services Adviser, > Learning Support Services, Learning & Information Services, > JG125, James Graham Building, Leeds Metropolitan University, > Headingley Campus, LEEDS, LS6 3QS, United Kingdom > Email: m.ford@xxxxxxxxxxxxxx > Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- randy sesser@xxxxxxxxx -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php