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: