Professional Web Applications Themes

Page has Expired, BACK-button -problem - PHP Development

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 ...

  1. #1

    Default 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



    Jarkko Kähkönen Guest

  2. #2

    Default Re: Page has Expired, BACK-button -problem


    "Jarkko Kähkönen" <jarkkokahkonen.com> wrote in message
    news:bleh45$cts$1mordred.cc.jyu.fi...
    > 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
    >
    >

    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_VARS["REFERER"]

    Hope this helps
    RG



    RG Guest

  3. #3

    Default Re: Page has Expired, BACK-button -problem

    Hi Jarkko!

    On Wed, 1 Oct 2003 15:25:41 +0300, "Jarkko Kähkönen"
    <jarkkokahkonen.com> wrote:
    >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?
    I use the following code on every page:

    if ($_POST){
    $_SESSION["postvalue"] = $_POST;
    header("HTTP/1.1 302 Moved Temporarily");
    header ("Location: ".BASE_URL.$sess->assemble(),true, 302);
    header("Connection: close");
    exit();
    }else{
    if (isset($_SESSION["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



    >
    >Thanks in advance!
    >
    >Best regards,
    >Jarkko Kähkönen
    >
    >
    --
    Jochen Daum - CANS Ltd.
    PHP DB Edit Toolkit -- PHP scripts for building
    database editing interfaces.
    [url]http://sourceforge.net/projects/phpdbedittk/[/url]
    Jochen Daum Guest

Similar Threads

  1. Replies: 1
    Last Post: April 22nd, 11:28 AM
  2. Page has expired -problem
    By Jarkko Kähkönen in forum PHP Development
    Replies: 2
    Last Post: October 1st, 08:51 PM
  3. Replies: 1
    Last Post: August 8th, 03:05 PM
  4. My Page and BACK button
    By Dan Vallejo [MSFT] in forum ASP.NET General
    Replies: 0
    Last Post: August 1st, 08:16 PM
  5. Replies: 1
    Last Post: July 23rd, 01:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139