I am trying to dledte images out of a folder using its name stord in the database but i cant seem to get it working, it either tells me that the file or directory doesn't exist or that the image_name hasnt been defined. Can anyone help me with this please....thanks in advance
echo "<a href=\"$PHP_SELF?id=$myrow[id]&delete=yes\">DELETE</a></td></tr>";
if ($delete) {
$dirs="/files/catagories/images/";
unlink($dirs.$image_name);
$sql = "DELETE FROM general WHERE id=$id";
$result = mysql_query($sql);