imagepng

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

imagepng

Post by psychotomus »

Ok. So I can save my image. It changes every time someone submits a form, but it doesn't change the image on the page itself. you need to refresh the page to get it to display the new image. how can I fix this?
//save image
imagepng($bg, "data/games/$gameid.png");
all {VAR} is replaced with real values. correct values at that
how i call the image;

Code: Select all

<input type="image" src="{MAPPATH}" height="{HEIGHT}" width="{WIDTH}" border="0" name="image">
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: imagepng

Post by pickle »

It's probably cached. You can get around that by referencing the image with a random string. The browser treats that as a unique URL and re-retrieves the image from the server.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply