Re: web refreshing problem

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

 



>>> >> my php program does not display current result of submitted form
>>> >> instead the previous content is shown until you refresh manually
>>> >> (which means resubmitting the form).
>>> >>
>>> >> Can someone help me out because, I want to display the result of the
>>> >> latest form result and not the old one.
>>> >>
>>> >> I am using apache server on windows. Please help.
>>> >
>>> > have you per chance got all data saved in the session and are using a
>>> > script
>>> > like
>>> >
>>> > if( something in session ) {
>>> >  show session
>>> > }
>>> > else if( something in post ) {
>>> >  add form data to session
>>> > }
>>> > else {
>>> >  show only the form
>>> > }
>>> >
>>> > three common causes are:
>>> > 1- you're not actually processing the new form data
>>> > 2- your browser isn't sending the form data second time round
>>> > 3- your browser is caching the page (very very unlikely)
>>> >
>>> > regards
>>> >
>>>
>>> Hi Nathan,
>>>
>>> Most likely your <form> is using POST method and your browser is
>>> caching the page.


>yes my form is using post method but how do you stop catching the page

hi Andrew,

use the code below. it is from this page
http://www.php.net/header
look for "Example #2 Caching directives".

<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>

to be sure, put them as the first 2 lines at the top.

Virgil
http://www.jampmark.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