so yeah this used to work for me before
it deleted the name from the database and the folder..but now i tryed to use it with another code and is not work..
i changed it in the right places i made this code before and it works but i tried everythign i know and nothing works.. can someone see something i'm not seen?
PHP Code:
if(isset($_POST['Delete'])){ $dir="albums/"; $pic=$picturedes['fotoname']; $dir='userpic/'.$pic; unlink($dir); $co="DELETE FROM tra_photo WHERE fotoname='$pic'"; $cod=mysql_query($co)or die(mysql_error()); if($co){ echo 'picture deleted!'; }else{ echo 'could not delete...'; } }
|