How can i delete image file in my server folder called (images) using php i am trying the following code
<a href="delete.php? id=<?php echo $row_DetailRS1['id'];?>">Delete</a>
this take me to delete.php page
$id=$_GET['id'];
$select = mysql_query("SELECT `file_name` FROM `flie_record WHERE `file_records`.`id` = '$id'");
$image =mysql_fetch_array($select);
@unlink('images/'.$image);
nothing happening
$imageis an array and you need to add the key:and
(int)to$_GET['id']– integer for MySQL injection hole.