It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

News

Log In Sponsors
Partner Sites

Code not running all the way through



Hey there,
so here's my code:
[code:1hptchrs]
<?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";

?>[/code:1hptchrs]

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.

Click here to read the whole forum topic