Solution to form data loss after phphistory. back is returned, history. back. Phphistory. solution to form data loss after return, history. backjs uses history. the main cause of data loss in the back returned form is the use of session_start ();, which is php history. solution to form data loss after return, history. back
Js uses history. back to return form data loss mainly because session_start (); is used. this function forces the current page not to be cached. This article introduces the solution to form data loss after php history. back is returned. For more information, see.
The solution is as follows:
Add header ("Cache-control: private") after your Session_start function. Note that your PHP program cannot have any output before this function.
In addition, the session-based solution is added before session_start.
Session_cache_limiter ('nocache'); // clear the form
Session_cache_limiter ('private'); // do not clear the form, only during the effective period of the session
Session_cache_limiter ('public'); // do not clear the form, as if the session is not used
Address: http://www.manongjc.com/article/823.html
Related reading:
Code for submitting the php $ _ PHP_SELF form to the current page
Solution to returning data loss after submitting a php form
Php uses JavaScript to submit a form to multiple pages
Submit the php form to the instance on the current page
Http://www.bkjia.com/PHPjc/1126526.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1126526.htmlTechArticlephp history. solution to form data loss after return, history. back js uses history. the main reason for data loss in the back returned form is that session_start (); is used. this function...