so here's my code:
- Code: Select all
<?php
echo "Removing: " . $_ GET['delete'] ."".$_ GET['type'] "<br />";
echo "Located: " . $_ GET['path'] . "<br /><br />";
$delete = $_ GET['delete'];
$type = $_ GET['type'];
$path = $_ GET['path'];
echo "Removing content from media database...<br />";
$sql = "DELETE FROM media WHERE name='$delete' AND type='$type'" ;
if($result= mysql_query($sql)){
return unlink($path);
echo "Image removed from server...<br />";
echo "The File: " . $delete . " has been successfully removed";
}
#return unlink($path);
echo "Image removed from server...<br />";
echo "The File: " . $delete . " has been successfully removed";
?>
It gets to echoing out "Removing content from media database..."
and it does remove it like it is supposed to. It removes the database entry and the image from the server.
But it stops there and doesn't echo out the confirmation at the end.
Any ideas as to why that happens?
Thanks.




