PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
corillo181
Forum Commoner
Posts: 76 Joined: Wed Apr 26, 2006 3:02 pm
Post
by corillo181 » Wed May 10, 2006 10:24 pm
i'm trying to delete a fiel from database and from the dir.. i already can delete it from the database but how i do for the file path..
i have this much going..
Code: Select all
<?php
include'../includes/db.php';
$dir='/userpic/';
$pic=$_GET['delpic'];
$delpath=$dir.$pic;
unlink($delpath);
$co="DELETE FROM userpic WHERE name='$pic'";
$cod=mysql_query($co);
$ed=mysql_fetch_array($cod);
header('Location: index.php');
?>
when i click delete it deletes from the database but can't make it delete from path..
Burrito
Spockulator
Posts: 4715 Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah
Post
by Burrito » Wed May 10, 2006 11:31 pm
corillo181
Forum Commoner
Posts: 76 Joined: Wed Apr 26, 2006 3:02 pm
Post
by corillo181 » Wed May 10, 2006 11:54 pm
it was my fault it was working just that i just a few file with almose the same name..