Foosicle Posted June 26, 2011 Share Posted June 26, 2011 I have a form with the following validation in the header. <?php if(!isset($fromemail) || empty($fromemail) || !isset($fname) || empty($fname) || !isset($lname) || empty($lname) || !isset($message)){ echo '<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.*********.com/include/createusererror.php">'; }else{ header('Location: http://www.*********.com/profile.php'); } ?> It then redirects back to the form, however all form data is lost. I am lost on how to save their data across this redirect. Help, masters of the force. It would be really cool to highlight the err on their screen. MOD EDIT: Fixed cratered code tags . . . Quote Link to comment https://forums.phpfreaks.com/topic/240475-saving-form-data-when-reporting-an-err/ Share on other sites More sharing options...
mikesta707 Posted June 26, 2011 Share Posted June 26, 2011 The easiest way in my opinion would be to just save the data in the $_SESSION super global. You could then unset that data once the form has been successfully completed. Quote Link to comment https://forums.phpfreaks.com/topic/240475-saving-form-data-when-reporting-an-err/#findComment-1235161 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.