Page has Expired, BACK-button -problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jarkko Kähkönen

    Page has Expired, BACK-button -problem

    Hi!
    I have Windows XP&IE6.0.2... (SP1).

    I'm coding one project with PHP.
    I get "Warning: Page has Expired" when I try to get back to the "POSTed
    page" (page whither moved from FORM-page).

    Better explanation:
    - Pages are:
    * Page A: Front-page
    * Page B: Page where is www-FORM

    #1.) From Page "A" I move to the page "B" by clicking link on page "A" and I
    fill the form's fields
    #2.) Then I click SUBMIT-button and I moved back to the page "A"
    #3.) I move to the page "B" by clicking link on page "A"
    #4.) I click "BACK"-button from browser
    #5.) I got "Warning: Page has Expired"


    I want that when I click BACK, I will be moved to the page "A" straightly
    without warning
    (of course then post-data can't get re-sent)

    Got any idea how in PHP I can prevent this warning?

    Thanks in advance!

    Best regards,
    Jarkko Kähkönen



  • RG

    #2
    Re: Page has Expired, BACK-button -problem


    "Jarkko Kähkönen" <jarkko@kahkone n.com> wrote in message
    news:bleh45$cts $1@mordred.cc.j yu.fi...[color=blue]
    > Hi!
    > I have Windows XP&IE6.0.2... (SP1).
    >
    > I'm coding one project with PHP.
    > I get "Warning: Page has Expired" when I try to get back to the "POSTed
    > page" (page whither moved from FORM-page).
    >
    > Better explanation:
    > - Pages are:
    > * Page A: Front-page
    > * Page B: Page where is www-FORM
    >
    > #1.) From Page "A" I move to the page "B" by clicking link on page "A" and[/color]
    I[color=blue]
    > fill the form's fields
    > #2.) Then I click SUBMIT-button and I moved back to the page "A"
    > #3.) I move to the page "B" by clicking link on page "A"
    > #4.) I click "BACK"-button from browser
    > #5.) I got "Warning: Page has Expired"
    >
    >
    > I want that when I click BACK, I will be moved to the page "A" straightly
    > without warning
    > (of course then post-data can't get re-sent)
    >
    > Got any idea how in PHP I can prevent this warning?
    >
    > Thanks in advance!
    >
    > Best regards,
    > Jarkko Kähkönen
    >
    >[/color]


    I've just come up against this problem.
    THere are 2 options, remove the cache header stuff or:
    Get the refering URL and send back: $HTTP_SERVER_VA RS["REFERER"]

    Hope this helps
    RG



    Comment

    • Jochen Daum

      #3
      Re: Page has Expired, BACK-button -problem

      Hi Jarkko!

      On Wed, 1 Oct 2003 15:25:41 +0300, "Jarkko Kähkönen"
      <jarkko@kahkone n.com> wrote:
      [color=blue]
      >Hi!
      >I have Windows XP&IE6.0.2... (SP1).
      >
      >I'm coding one project with PHP.
      >I get "Warning: Page has Expired" when I try to get back to the "POSTed
      >page" (page whither moved from FORM-page).
      >
      >Better explanation:
      >- Pages are:
      > * Page A: Front-page
      > * Page B: Page where is www-FORM
      >
      >#1.) From Page "A" I move to the page "B" by clicking link on page "A" and I
      >fill the form's fields
      >#2.) Then I click SUBMIT-button and I moved back to the page "A"
      >#3.) I move to the page "B" by clicking link on page "A"
      >#4.) I click "BACK"-button from browser
      >#5.) I got "Warning: Page has Expired"
      >
      >
      >I want that when I click BACK, I will be moved to the page "A" straightly
      >without warning
      >(of course then post-data can't get re-sent)
      >
      >Got any idea how in PHP I can prevent this warning?[/color]

      I use the following code on every page:

      if ($_POST){
      $_SESSION["postvalue"] = $_POST;
      header("HTTP/1.1 302 Moved Temporarily");
      header ("Location: ".BASE_URL.$ses s->assemble(),tru e, 302);
      header("Connect ion: close");
      exit();
      }else{
      if (isset($_SESSIO N["postvalue"])){
      $_POST = $_SESSION["postvalue"];
      }
      }

      This redirects every post request to a get request and fills the
      $_POST array transparently. as there is no POST request to "back" to,
      you don't get the warning

      HTH, jochen



      [color=blue]
      >
      >Thanks in advance!
      >
      >Best regards,
      >Jarkko Kähkönen
      >
      >[/color]

      --
      Jochen Daum - CANS Ltd.
      PHP DB Edit Toolkit -- PHP scripts for building
      database editing interfaces.
      Download PHP DB Edit Toolkit for free. PHP DB Edit Toolkit is a set of PHP classes makes the generation of database edit interfaces easier and faster. The main class builds tabular and form views based on a data dictionary and takes over handling of insert/update/delete and user input.

      Comment

      Working...