title: How to unlink image in php
body: <p>i upload image to the server and save the path in data base. Now i want to delete that record and also the image with that record
  my code is </p>
  
  <pre>$id=$_GET['id'];
  $select=mysql_query("select image from table_name where question_id='$id'");
  $image=mysql_fetch_array($select);
  @unlink($image['image']);
  $result=mysql_query("delete from table_name where question_id='$id'");</pre>
  
  <p>when i echo $image['image']; this will give me <pre>http://www.example.com/folder/images/image_name.jpeg</pre>
  The record is deleted successfully but the image remains there on server.</p>