johnsmith153 Posted July 21, 2010 Share Posted July 21, 2010 I know this is ultra basic but I am sure there is a better way than how I do it. I always submit the form to the same page: <?php $error = ""; if(isset($_POST['submit'])) { //check form if($formOK==1) { //add record and redirect } else { //allow page to continue so display form again $error = "Not completed"; } } echo $error; ?> <form> <input type="text" name="name" value="<?php echo $_POST['name']; ?>"> </form> ..so the above always shows the values entered in the form The problem is I get the web-page expired problem. If I header redirect after form submit (either another .php page or the same one) I then lose ability to display values submitted in $_POST. What do I do to get $_POST values but no web-page expired messages? Quote Link to comment https://forums.phpfreaks.com/topic/208365-prevent-web-page-expired/ Share on other sites More sharing options...
PFMaBiSmAd Posted July 21, 2010 Share Posted July 21, 2010 You have got an existing active thread for this. Don't start another thread for the same problem. Quote Link to comment https://forums.phpfreaks.com/topic/208365-prevent-web-page-expired/#findComment-1088894 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.