Jump to content

file and folder delete from form


iantearle

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.
Link to comment
https://forums.phpfreaks.com/topic/21949-file-and-folder-delete-from-form/
Share on other sites

Archived

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

×
×
  • Create New...

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.