Jump to content


This topic is now archived and is closed to further replies.


file and folder delete from form

Recommended Posts

I have been trying to work out an argument for ages, but cannot get this to work, I am new to PHP so need anyones help!!!

I am sending file and folder names from a form to a script which will delete the matching file or folder the action im using is;

<? rmdir($_GET["foldername"]); ?>

<? unlink($_GET["foldername"]); ?>

where foldername is from the form im submitting. i want to be able to submit the name of either file / folder from the same form, and have the PHP delete either without handing out an error message.

Please help, i have tried various ways including function rm($fileglob) but to no avail.

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.