Jump to content

delete files from server


alin19

Recommended Posts

i have a webpage witch alows you to add a picture on the server, it uploads the picture in a folder and it's name in a database, this works just fine, but now i have a button that when i press that picture name is deleted from the database  but the picture from that folder i can't delete it, i've tryed this comand:

 

$delS=$conexiune->select("select `nume_poza` from `poze_upload` where `id`='$id_sters'");

$update=$conexiune->update("delete from `poze_upload` where `id`='$id_sters'");

$delF=$update[0]['nume_poza'];

unlink("../poze_produse/$delF");

Link to comment
https://forums.phpfreaks.com/topic/128265-delete-files-from-server/
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.