ConfusedOfLife
10-25-2003, 01:43 PM
Hi
My situation is too simple, I'm having an image in my page displayed to clients, ok? I also have a form in the same page that accepts an image file to be uploaded. The image that is uploaded via this form should take the place of the image that's displayed in the page. I always use one name for that image: "main.jpg" and when a new image is uploaded, I move it to the same directory and name it as "main.jpg", which means it overwrites the previous image. So, some lines after the PHP code that does this, I'm having my normal HTML img tag that shows the image.
But the problem is that whenever I upload an image, it still shows the previous image in the page and only if I press F5, it'll change it. I'm sure that the new image overwrites the previous one (I go to the directoy and check it!!), but I dunno why it doesn't show the new one. I think even though my HTML code is after my PHP code, but b4 it excecutes the PHP code, it'll read the image and because of that I still get the old image when I press the Upload button. I really don't know what to do to change the order, any help is greately appriciated.
bijan
My situation is too simple, I'm having an image in my page displayed to clients, ok? I also have a form in the same page that accepts an image file to be uploaded. The image that is uploaded via this form should take the place of the image that's displayed in the page. I always use one name for that image: "main.jpg" and when a new image is uploaded, I move it to the same directory and name it as "main.jpg", which means it overwrites the previous image. So, some lines after the PHP code that does this, I'm having my normal HTML img tag that shows the image.
But the problem is that whenever I upload an image, it still shows the previous image in the page and only if I press F5, it'll change it. I'm sure that the new image overwrites the previous one (I go to the directoy and check it!!), but I dunno why it doesn't show the new one. I think even though my HTML code is after my PHP code, but b4 it excecutes the PHP code, it'll read the image and because of that I still get the old image when I press the Upload button. I really don't know what to do to change the order, any help is greately appriciated.
bijan