Azaz Posted July 26, 2010 Share Posted July 26, 2010 Ok well I submit my form and go back and all the fields are completely empty.... Like if I make this post then click back I can see everything I wrote, am I missing something? Is it even related to php or a html missing structure? Quote Link to comment Share on other sites More sharing options...
aleX_hill Posted July 26, 2010 Share Posted July 26, 2010 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"> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.