On Wed, 2004-10-13 at 16:11 -0400, Adil wrote: > function deleteFiles() { > foreach($_POST['stack'] as $i) { //This should work but I > can't > tell if it is or isn't > mysql_query("DELETE FROM uploads WHERE upload_id =" . "$i"); > } > header("Location: http://" . $_SERVER['PHP_SELF']); //forces > a > page refresh to show the file list without the items that were > deleted. > }
For sanity of your mysql database, you might consider making this one query. Something like DELETE FROM table WHERE id IN (32,34,46,432,35); generating your list of numbers/ids from your array... -Robby -- /*************************************** * Robby Russell | Owner.Developer.Geek * PLANET ARGON | www.planetargon.com * Portland, OR | [EMAIL PROTECTED] * 503.351.4730 | blog.planetargon.com * PHP/PostgreSQL Hosting & Development ****************************************/
signature.asc
Description: This is a digitally signed message part