Re: Multiple file delete

From: Date: Fri, 11 Mar 2005 20:43:03 +0000
Subject: Re: Multiple file delete
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-210550@lists.php.net to get a copy of this message
Ashley M. Kirchner wrote: > > I have a page that displays the contents of a folder. Right now, > each file has a little 'delete' button next to it that users can click > on, however with many files it gets cumbersome. I need to be able to > have them click on checkboxes and then hit one delete button which will > then get rid of everything checked, but I don't know how to combine the > form with PHP so that it takes the info from one into the other and > delete what's needed. Any pointers would be very helpful. Thanks. > > -- A Have each checkbox that is created have its name set to the name of the directory. Then foreach($_POST['checkboxes']) and if the box was checked, then you delete that directory. Just be sure to do data validation on each pass through the loop. -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.general (#210550) next »