Re: After INSERT form submit - Data doesn't refresh!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm pretty sure this is a cache issue ..

To disable caching:*
header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past
header('Pragma: no-cache');
*

But if you have the modification date then use
*$time = filemtime($ffile);
header('Last-Modified: '.gmdate('D, d M Y H:i:s', $time).' GMT');

*
On Tue, Jul 22, 2008 at 1:14 PM, Rahul S. Johari <
sleepwalker@xxxxxxxxxxxxxxxx> wrote:

> Ave,
>
> I'm wondering if there's a PHP solution to this, I could be in the wrong
> place.
> I have an INSERT form which submits to the same php page, which also
> displays the records from the mySQL database the INSERT form submits to.
> When the form submits and the page returns, the added record does not show
> up unless you "Refresh" the page.
>
> I'm imagining even after form submit, the Browser is caching the data and
> displaying data from the Cache.
>
> Is there a solution to this? Is there anything PHP can do to instruct the
> browser not the cache the data?
>
> Thanks!
>
> ---
> Rahul Sitaram Johari
> Founder, Internet Architects Group, Inc.
>
> [Email] sleepwalker@xxxxxxxxxxxxxxxx
> [Web]   http://www.rahulsjohari.com
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux