PHP page does not synchronize with database refresh issues

Source: Internet
Author: User
PHP page does not synchronize with the database refresh problem
My current problem is that (1.php and 2.php in the framework of the 1.php page to add data to the database, and added successfully, to the 2.php page to display the contents of the database, but there is no latest added that record, continue to add data, submitted, in the 2.php page displayed before the data submitted, but did not show the data submitted by this time, you master , how to solve Ah, see on the Internet, said is the cache problem, in the PHP page with the following code can be, but, I have added each page, why still no use AH. It's going to be a nasty death.
@ Header (' expires:thu,01 Jan 1970 00:00:01 GMT ');
@ Header (' last-modified: '. Gmdate (' d,d M Y h:i:s '). ' GMT ');
@ Header (' cache-control:no-cache,must-revalidate,max-age=0 ');
@ Header (' Pragma:no-cache ');
------Solution--------------------
You are 1.php after the data is submitted, the entire page is refreshed, but 2.php is not updated, right?
If it is a cache problem, you can change it to 2.php in the frame's 2.php src? this way the 2.php is not cached.

For example, this:





  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.