[nycphp-talk] Warning: Page has expired!!
Anirudh Zala
zala007 at hotmail.com
Thu Aug 1 12:03:48 EDT 2002
Hello all..
No solution will work in this problem...As this is POST method of submitting
data..so headers opr other tricks will work perfectly as u want.
But if you really want that.. while clicking back button of your
browser..user would not get "Web page expired" message then do 1 thing..
When page loads..first..generate a random hash key..in very begining of
script...and store in db.. now pass that key value as hidden varible when u
submit that form.. Now again get that key from db just where your submit
even starts..and match that db key value with your hidden variable key..
means that form is submitted properly bcoz u have propr match (hidden var
key is in db too) ..Now when submit event ends and u r going to pass
header(means direcing page to other page)..just before it delete that key
from db..so now your whole page event is over..
when user tries to hit back button of your browser..means submit event..will
be called as we know.but there u have written query of that selection key
and as u know user will not get..that perfect match between what is still in
cache and what is in your hidden var
Now bingo u can do whatever when u don't found..this
match.means..redirecting to same page or other page..with message like "No
dual submission is allowed"
This methid is extrmely useful when u r submiting imp data which must not be
submitted more than once per page loading..
Thanks
Anirudh Zala
LAMP+PX
INDIA
PS: if my lang is lil rough and unclear then sorry :(
>From: Kayra Otaner <kayraotaner at yahoo.com>
>Reply-To: talk at nyphp.org
>To: NYPHP Talk <talk at nyphp.org>
>Subject: Re: [nycphp-talk] Warning: Page has expired!!
>Date: Thu, 1 Aug 2002 10:46:07 -0400
>Received: from mc1-f29.law16.hotmail.com ([65.54.236.36]) by
>mc1-s2.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Thu, 1 Aug
>2002 07:51:19 -0700
>Received: from slipdisc.virul.net ([66.114.66.188]) by
>mc1-f29.law16.hotmail.com with Microsoft SMTPSVC(5.0.2195.4905); Thu, 1 Aug
>2002 07:50:25 -0700
>Received: from nyphp.org (slipdisc.virul.net [66.114.66.188])by
>slipdisc.virul.net (8.11.6/8.11.6) with ESMTP id g71Ek7P48156;Thu, 1 Aug
>2002 10:46:07 -0400 (EDT)(envelope-from listmaster at nyphp.org)
>Message-Id: <200208011446.g71Ek7P48156 at slipdisc.virul.net>
>X-Paralist-Archived:
><http://nyphp.org/list/paralist_archive.html?L_mid=904>
>X-List-Software: Paralist 0.6
>List-ID: <nyphptalk.nyphp.org>
>List-Owner: <mailto:listmaster at nyphp.org>
>List-Archive: <http://nyphp.org/list/paralist_archive.html?L_lid=1>
>List-Subscribe: <http://nyphp.org/list/>
>List-Unsubscribe: <http://nyphp.org/list/>
>Organization: New York PHP
>X-Mailer: Paramail 0.5
>Return-Path: listmaster at nyphp.org
>X-OriginalArrivalTime: 01 Aug 2002 14:50:26.0169 (UTC)
>FILETIME=[C571EE90:01C2396A]
>
>Hi,
>
>You can solve most of the 'page has expired messages' using :
>
>header("Cache-Control: yes-store, yes-cache");
>header("Pragma: yes-cache");
>
>on top of page.
>Actually this also works for POST method but sometimes I'm getting page
>expired messages although
>I used this header all the time. I've checked that it is not because of
>browser, it happens
>randomly on all versions of IE and Netscape. I guess this weirdness caused
>by Isp's proxy servers.
>
>Best
>
>Kayra Otaner
>
>
>--- Oktay Altunergil <nyphp at altunergil.com> wrote:
> > I'm not too sure about this but normally when you hit back on a posted
>page, it should ask you
> > whether to post the form again.
> >
> > Might this have something to do with a <HTTP-EQUIV="PRAGMA"
>CONTENT="NO-CACHE"> tag you might
> > have on the page ?
> >
> > Oktay
> >
> > On Thu, 01 Aug 2002 02:59:01 -0400
> > "Donald J. Organ IV" <dorgan at optonline.net> wrote:
> >
> > > i dont think you can get around this, basically you are getting that
>message
> > > because the information was posted by a form.
> > >
> > > ----- Original Message -----
> > > From: <WEBPHP4 at aol.com>
> > > To: "NYPHP Talk" <talk at nyphp.org>
> > > Sent: Thursday, August 01, 2002 2:28 AM
> > > Subject: [nycphp-talk] Warning: Page has expired!!
> > >
> > >
> > > > I wrote an app that has a master config file which contains all the
> > > session
> > > > calls. I have writen many php files that have require statements
>that call
> > > > this master config file.
> > > >
> > > > When ever I hit the back button from any of these pages at any time
>I get
> > > the
> > > > page that tells me the page has expired. I was wondering how I can
>get
> > > around
> > > > this. I would like it to display the last page and all the data that
>was
> > > in
> > > > the text boxes, and so on.
> > > >
> > > > I do hope I gave enough info
> > > >
> > > > John
> > > >
> > > >
> > >
> > >
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Health - Feel better, live better
>http://health.yahoo.com
_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com
More information about the talk
mailing list