Jump to content

Recommended Posts

so yeah this used to work for me before it delete 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 is not working.. can someone see something i'm not seen?

[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...';
}
}
[/code]
Link to comment
https://forums.phpfreaks.com/topic/10523-why-isnt-this-code-workin/
Share on other sites

[!--quoteo(post=377360:date=May 26 2006, 01:50 PM:name=AndyB)--][div class=\'quotetop\']QUOTE(AndyB @ May 26 2006, 01:50 PM) [snapback]377360[/snapback][/div][div class=\'quotemain\'][!--quotec--]
What isn't it doing that you're expecting it to do?
[/quote]


it has to delete the name from the database and delete the file with the same name from a directory..
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.