Hi all,
Try to use unlink function to remove somthink and I get this appear on the page when try run it .
Code:
Warning: unlink() [function.unlink]: Unable to access assets/images/gallery/thumb/thumb_1264784987.jpg in /customers/sallyanncharters.co.uk/sallyanncharters.co.uk/httpd.www/Update/del.php on line 22
Warning: unlink() [function.unlink]: Unable to access assets/images/gallery/full/1240463278.jpg in /customers/sallyanncharters.co.uk/sallyanncharters.co.uk/httpd.www/Update/del.php on line 23
the code for the page is
Code:
<?php
if(isset($_GET['delimage']))
{
//get image from the database
$query = "SELECT * FROM gal_images WHERE imageID = '{$_GET['delimage']}'";
$result = mysql_query($query) or die('problem: ' . mysql_error());
//add data to an object
$row = mysql_fetch_object ($result);
//if the image thumbnail and full image is not empty then remove the image from the server
if($row->imageThumb !== '' && $row->imageFull !== '')
{
unlink ($row->imageThumb);
unlink ($row->imageFull);
}
//delete image from database
$query = "DELETE FROM gal_images WHERE imageID = '{$_GET['delimage']}'";
mysql_query($query) or die('Error : ' . mysql_error());
}
?>
and the lines 22 and lines 23 are .
Code:
unlink ($row->imageThumb);
unlink ($row->imageFull);
any help would be nice thanks
|