PHP/refresh image problem
Posted: Wed Jul 20, 2005 6:40 pm
I have a form where people can post a housing ad with two pictures. If the user posts two pictures, and then you view there ad, the pics display fine. But, if the user edits/overwrites those pictures (using an edit-ad form) with different ones, the new pictures won't display until the user hits the refresh button on their browser.
I am using a MySQL db to store the path of the images and then copying the actual uploaded images into a folder called "uploads." I then display the image using an <img> tag with the image path.
I know it sounds confusing, but basically it is as follows:
1.) The first image the user has is called 1_01.jpg.
2.) The user then decides to upload a different image to replace the above image.
3.) The new image is also called 1_01.jpg, but when you go to view the new image, you still see the old one, until you hit refresh on your browser. At that point, the new pic displays.
I know it sounds like a memory problem, but I have tried everything to get the old photo out of memory.I have tried refreshing using PHP, HTML, and so on and have had no luck. I also tried to use the HTML META NO-CACHE tag with no luck, any help would be greatly appreciated!
Thanks, Adam
I am using a MySQL db to store the path of the images and then copying the actual uploaded images into a folder called "uploads." I then display the image using an <img> tag with the image path.
I know it sounds confusing, but basically it is as follows:
1.) The first image the user has is called 1_01.jpg.
2.) The user then decides to upload a different image to replace the above image.
3.) The new image is also called 1_01.jpg, but when you go to view the new image, you still see the old one, until you hit refresh on your browser. At that point, the new pic displays.
I know it sounds like a memory problem, but I have tried everything to get the old photo out of memory.I have tried refreshing using PHP, HTML, and so on and have had no luck. I also tried to use the HTML META NO-CACHE tag with no luck, any help would be greatly appreciated!
Thanks, Adam