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 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Values Dissappear After Clicking Back Button

    I don't know if this post should be here or in javascript cos its a bit of both but here goes.

    I have a page, say main1.php which has text boxes. There is also a link which will open a window, get a data from there and store it in one of the text boxes in main1.php

    after that, when i click the next button, it goes to main2.php. But when I tried to click the back button in main2.php, it goes back to the first page main1.php but all the records are gone.

    I noticed something funny. If i do not use the pop up window, there will be no problem in main2.php when i click the back button. if i use it, then i have the problem.

  • #2
    New Coder
    Join Date
    Jul 2006
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Help anyone?

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,994
    Thanks
    4
    Thanked 2,662 Times in 2,631 Posts
    Not sure what the problem is exactly, but instead of worrying over whether its the js or the php, just use php sessions instead, that way you can retrieve the values to repopulate the form using the php sessions.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 
    Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)

  • #4
    New Coder
    Join Date
    Oct 2006
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts


  •  

    Posting Permissions

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