Jump to content

How to Save Post data.. w/o using cookies


Azaz

Recommended Posts

Take a look at the $_SESSION variable, this might help.

 

For example, I assume you are verifying the form inputs on the submit page? If so, then something like this:

session_start(); //Run this statement before outputting anything to the browser
foreach ( $_POST as $foo=>$bar ) {
        $_SESSION[$foo] = $bar;
}
//Perform verification here

 

Then if you need to return to your form because they havent filled something in correctly, send them back and do something like this:

<input type="text" <?php if(isset($_SESSION['myid'])) echo "value=\"".$_SESSION['myid']."\""; ?> id="myid">

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.