PDA

View Full Version : keep my form values even after page refreshing or reloading?


student101
09-16-2008, 12:22 PM
How on earth do I keep my form values even after page refreshing or reloading?
Is there a trick or a script that can do this?

I code in PHP but javascript can do anything and looking for a real life solution, without the baggage.

Cheers

davidj
09-19-2008, 06:49 AM
you would do this in PHP

just echo the $_POST['field name'] or $variable which you assigned from the $_POST['field name'] into the value attribute of the field

student101
09-19-2008, 07:47 AM
Yes that was my first action.
Then I thought about it and realized that my data was stolen, stolen I tell you.
It's the cache who stole my data.

So I added this;

if (!isset($_SESSION)) {
session_start();
}
header("Cache-control: private");