Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jan 2006
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    my page always expired ?

    Hi, I'm writing a website in PHP at home, no internet connection.Im using a single software that give me Apache server, PHP..I have a small forum,after user added a topic, I redirect him to homepage, then if he click back button in IE , IE will say that the page he requesting is expired ? It says that my page was created by infomation submitted in a form, to see that page it has to resubmit that information ?

    I have tried with this forum, I answear in quick reply to a topic, it showed me my reply, then I go to another page on the menu, then I click back, the page is not expired ?I got the page before I posted my reply.

    Can anyone explain this for me?

  • #2
    New Coder
    Join Date
    Oct 2005
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the best thing to do is redirect the person to the page where they have posted to using

    PHP Code:
    header ("Location: page_with_post.php"); 
    the reason why the page comes up with expired as the person has submitted data to that page and normally if you go back the page will want to resubmit the data and this would lead to duplicates or errors so its best to redirect and to give the users enough links so that they do not want to use the back button as the back button generally mucks up the forum.

    hope this helps

  • #3
    New Coder
    Join Date
    Jan 2006
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh, thanks, I got a reply from last time from someone telling me that I should
    refresh my page, I put that idea to my code and it worked real fine.My page is like the page for viewing a topic and all of its reply of this forum, but cretainly not powerful like this .
    After posting a reply, I refresh this displaying page, using javascript "window.location=temp; " temp is a variable whose value is assigned by a small PHP code,it worked, no expiring anymore .I guess your suggestion will work fine too.Thanks


  •  

    Posting Permissions

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