I am currently working on shopping cart.let me quick expain whats happening in product_info.php page.
in product info page products information in displayed such as name,price,image etc..
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.
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.
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.
my question is how woulld i unlink the previous image from folder when new image will create? Thanx In Advance.