Re: Multiple file delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux