itssami
Mar 5 2007, 05:00 PM
| | i wrote some code to upload the pictures to a folder and after it has uploaded, there's a page, say pics.php.. it displays all pictures of the folder to that page. now i want to add an option to delete the pictures. for example i want to add a link "Delete" under every pic, that when i click it deletes the pic from the folder and deletes the pic data from mysql. How i can delete the pic from the folder? thanks
|
Reply
rvalkass
Mar 5 2007, 08:25 PM
The
unlink function is what you need to delete files. You presumably have the path to each image (if you are displaying them on the screen), so you can add that path to a link that runs the unlink function. You can read a little bit more about it
here. Just be careful with it, and make sure the permissions allow you to delete the file.
Reply
Similar Topics
Keywords :
delete uploaded folder- Delete Problem With Id
- Id as auto_increment, and identifier for a row (4)
- How To Delete A Row In Mysql.
- A very simple help required (4)
Im using the following code, for very simple work.. it simply gets and print the comments which are
stored in the database. Now it will show like comment 1. comment 2. comment 3. etc etc i want to
add 'delete' option that i can delete any comment. it displays like comment 1.
Delete comment 2. Delete comment 3. Delete
So that when i click on delete, it simply deletes the comment and print the remaining comments. Its
very simple. i hope you understand. QUOTE $result = mysql_query("sele...
File String Delete?
- (2)
Say i have a file file.txt... Can someone give me an example of how to delete a string from this
file ie.. The file contains: wappy::sucks::at::php --- i want to delete sucks::...
How To Access A Folder In Php Page
- (1)
I have a folder on my hosting space..(i.e. public_html), i want to add this folder on my php page..,
. how it should be done that, when i add some file in the folder using ftp or anything , the folder
on that page automatically includes that file.for example , if the folder has 5 files..and on page
it says "folder has 5 files" and shows the files...and when i have uploaded 2 more files ,it should
automatically say that folder has 7 files.. ...
Looking for delete, uploaded, picture, folder