I have a form and here's what I have an issue with....
If the user types something in the boxes, and then accidentally goes to another site/page in the site WITHOUT hitting submit on the form, all the data is lost when they click the back browser button. What I want them to be able to do is hit the back button and all the information to still be there. (quick example, as i was typing this i accidentally clicked a link on the side, i hit back and everything I had typed was still here!!)
I was told the best way to do this is through cookies.
I've never done anything with cookies, so here's what I have and it doesn't seem to work. I have tried setting the cookie both before and after the textbox and have no result....
<input name="txt_blogname" type="text" id="txt_blogname" value="<?php echo $_COOKIE["TestCookie"]; ?>" size="75" maxlength="100">
<?php
$value=$HTTP_POST_VARS['txt_blogname'];
// send a simple cookie
setcookie("TestCookie",$value);
?>
Please help!