Need help in refreshing page after creating a picture {GD}



Hi friends,
I am a college student doing my project in php.

I will have to create a picture u GD library the send the picture to someones mail as desired.

I have created the picture in one page.

well on pressing the <preview picture> button.

and using this imagejpeg($background,"",100);

the modified picture appears.
<disadvantage is i could no add buttons and other things when i use the above code>

but using this

and using <img src="completed.jpg"> the picture of the preview edit option was displayed.

then after pressing the refresh button the new picture is displayed.

is there any way to refresh the page & display the current image.

to be more clear i will specify the project of mine with screenshots.

Intially i will have to create a e greeting like thing using the following selecting the font & bgcolor etc.

Screenshot 1:


ScreenShot 2:

After pressing the Preview Before Send Button:


Ok Next Going back using the go back button returns to the previous page

Next I am making some changes in the font color alignment.

Screen shot 3:


Then Pressing the Preview Before Send Button again:


It shows the image edit previously,

then after pressing the Refresh Button in the browser.

the following appears.


What i want is. when ever i go back & make some changes. i want the change to be reflected immediately with out pressing the refresh button.

If any one of u have any idea. please help me.

And Can we fix the lenght of the characters to be diaplayed per line using the imageTTF functions.

Thanks in advance.

i think meta tag no-cache would help..
the problem is that browser doesnt refresh the cache. So this is mostly the cache problem.

there are several different ways and i dont remember any of them.. :(

ahh: here

what you need to do is...
have a page which just renders the image, by taking parameters in GET
and then when you want to change the page,
with DOM, change the img src to a new img with different GET parameters to same page