Page 1 of 1
php deletion form
Posted: Sat Dec 20, 2008 12:59 pm
by mrshock
hey, i currently run a image hosting website,
http://www.imagebooth.net, but i need some help, every image has a code on the end (example: ajwdab2e2e2) i want to create a form, so if someone wants to delete an image, they simple enter there id into the form and hit a delete button, and the image id that matches with an id in the pics folder will get deleted,
any help appreciated
thanks,
Re: php deletion form
Posted: Sat Dec 27, 2008 4:20 pm
by cptnwinky
If the id is physically appended to the file name, like image.jpgajwdab2e2e2 or any variation of that (image.ajwdab2e2e2.jpg) then you will need to use something to recurse over the directory files (dependent on which php version your using) and then use a regular expression to find that specific image.
If you can give me anymore info such as which version of php your using and what the image name with the code actually looks like. I could help whip up some quick code.