title: How to unlink image from folder?
body: <p>I am currently working on shopping cart.let me quick expain whats happening in product_info.php page.</p>
  
  <p>in product info page products information in displayed such as name,price,image etc..</p>
  
  <p>i have made small functionality in this page.i have put 10 small diffrent color images below the product main image and 2 text boxes to write something on main image using php Gd.</p>
  
  <p>i have made ajax function which is called on onclick of image small images and on onkeyup of two text boxes with three parameter : selected color image's path and value of textboxes.Now when user will click on the one of the color image or Write text in the text box then this function will call and the response will go in the img.php file in which the dynamic image is created using GD and stored in the folder(not in databse) with random image integer name and this image. and from img.php it will get in product info page and display in main image.this new image's path will store in session for when user done checkout then it will store in table.</p>
  
  <p>same process will repleat when user select diffrent color or eneter diffrent value in text box and every time new image will create and save in folder.</p>
  
  <p>my question is how woulld i unlink the previous image from folder when new image will create? Thanx In Advance.</p>