


Solution to form data loss after php historyback returns krshistory history download history simple notation
Jul 29, 2016 am 08:49 AMThe main reason why js uses history.back to return form data is because session_start(); is used. This function will force the current page not to be cached. This article introduces to coders the solution to the loss of form data after php history.back returns. Interested coders can refer to it.
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 line.
There is also a session-based solution, add
session_cache_limiter('nocache');//Clear the form
session_cache_limiter('private'); //Do not clear the form, only while the session is in effect
session_cache_limiter( 'public'); //Do not clear the form, as if the session is not used
Original address: http://www.manongjc.com/article/823.html
Related reading:
php $_PHP_SELF form is submitted to the current The code of the page
Solution to the loss of form data returned after the php form is submitted
php combined with js to implement the method of submitting the form to multiple pages
php form submission to the current page instance
The above introduces the solution to the loss of form data after php historyback returns, including the history aspect. I hope it will be helpful to friends who are interested in PHP tutorials.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel

Simplified HTTP Response Mocking in Laravel Tests

Build a React App With a Laravel Back End: Part 2, React

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon

Announcement of 2025 PHP Situation Survey
