Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




FORM MEMORY ON PRESSING BACK BUTTON


Do most browsers retain form fillup memory of previous page ? That is
when the user presses back button, the forms on the previous page come
up filled.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Pressing Browser Back Button - Form Filled Data Disappeared
When filling out a web form on a php page that is submitted to a search
which lists the results based on the criteria provided (in the form), all
works fine and as expected.

However, when I press the back button to amend the form all of the search
criteria data has gone and I have to fill it all out again if I want to do a
similar search which is frustrating. (This does not actually happen in
Firefox browser but most of my users will be using IE). How can I prevent
this from happening?

Previously I made a post about avoiding "Page has expired" and the
conclusion I came to for that was not to use a "POST" which did the trick.
But now I want to retain the data I input?

Form / Results / Navigator's Back Button
I have a research form script, a result list script and an item page. Just
classic!

form page => result list page => item page

When I'm at the item page and I click on the Navigator's back button I have
the following message:

Avertissement : expiration du délai pour cette page

La page requise a été créée en utilisant les informations fournies dans un
formulaire. Cette page n'est plus disponible. Par sécurité, Internet
Explorer ne renvoie pas automatiquement les informations vous concernant.

Pour envoyer vos informations à nouveau et afficher cette page Web, cliquez
sur le bouton Actualiser .

The normal use in fact .

Is there any way to get to the list again?

Form Data Lost On Browsers Back Button
How is it possible that when a user fills in a form that i made, sends it and then hits the browsers back-button the form is empty. The strangest thing is that when i take these steps everything is ok. I think it has something to do with the settings in apache or php.


Preventing Back/forward Button Form Resubmission
I have a site that is form intensive and would like to prevent users on my site from resubmitting forms when they press back or forward, which they will likely do at some point no matter how I program it. 

So, I am interested from hearing from people who 1) had the same need and 2) implemented something in PHP with which they were satisfied.  How did you go about doing this?

Populating The Drop Down And Pressing The Submit Button
1. The first is I have two drop down menus. The first is "year" and the second is "mfr". When a user selects a year from the drop down it then populates the second drop down, mfr, from the MySQL database. Theat is working fine. But the problem I am having is the "submit" button (which I have labeled as "browse"). When I click it. Nothing happens, no action tacks place. I have looked over the code and I can't figure it out. (See Code Box 1 Below).

2. Right now the "mfr" drop down is populated by the MySQL database and reads with a list like "Acr", "Alp", etc. These are abreviations. I need to set up an array to have them instead read the entire mfr name. Example: Instead of "Acr" it needs to be "Acura". Instead of "Alp" it needs to be "Alpine". I need these full names to appear in the drop down. I know I need to do something like this (See Code Box 2 Below) but I can't get my finger on it. Code:

Session Problem - Login Screen Continually Reloads After Pressing The Login Button
I am trying to get sessions to work on a log in screen to give certain
users access to certain pages/directories. The problem is that when
the login button is pushed (or the enter key pressed) the login screen
redraws, never loading the next page. I don't get any error messages.
I am using FreeBSD-5.1/Apache-2.0.46/MySQL-4.1.0.1/PHP-4.4.3.4

I have pasted the code below:

Submit Form By Pressing Any Key.
I would like to create a hidden form which shold be submitted after
user press any key. Is it possible?

Problem With Pressing Enter On One-textfield Form
I have a mail form, where I would like the users to enter a secret code and
check one checkbox before the form are processed and the values can mailed.
Otherwise stop and display an error. But it won't work. What's wrong with my
nice newbie-code? Here it is:

The form:
<div>
<form method="post" action="process.php">
<p>Name:</p>
<input name="name" type="text" />
<p>Email:</p>
<input name="email" type="text" />
<p>Subject:</p>
<input name="subject" type="text" />
<p>Message:</p>
<textarea name="message" rows="6"></textarea>
<p>Enter secret send-code:</p>
<input name="secret_code" type="text" />
<p>Agree to terms?:</p>
Yes <input name="check[]" type="checkbox" value="yes" />
No <input name="check[]" type="checkbox" value="no" />
<br />
<input type="submit" name="submit" value="Send" /><input type="hidden"
name="do" value="send" /><input type="reset" name="reset" value="Reset" />
</form>
</div>

Here is process.php:

<?php

Back Button
I have two questions.

1. When the user presses the back button and returns to a form he filled
the form is reseted. How do I leave there the values he inserted?

2. When the user comes back to a page where he had a submitted POST data
the browser keeps telling that the data has expired and asks if repost. How
to avoid that? I tried registering all POST and GET vars as SESSION vars but
it also has its disadvantages...

Back Button Problem
On my development site: http://beta.deluxeportal.com/index.php I'm having some strange problems with the back button...

For example, if you try posting and leave out a message, you get an error. You can press back to return to the posting page. This is how it works on most pages, and this is what I want. However, on a very select number of pages (the login page, and the search page), if you get the error message and press back, you still get the screen with the error message. Then, the next time you press back, you are completely taken out of the page.

I haven't been able to figure this out, as I can't see anything that makes those pages different from the others.

Disabling The Back Button
I have a form that is to be filled. The summit button call a php script that populates a database. Is there a way to make sure that if someone click on the back button on the browser they do not get a chance to send the same form again.

Back Button And Sessions
When I create a session-based site and hit the back button I get this error:

Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh button.


How do I avoid that, or at least create a back button on my page that works like the browser's back button does?

Thanks!

Back Button On Your Browser
My question is based around back button on your browser .

Currently I have a form that feeds it's information into a MySql database. I give my users the ability to add, edit, and delete entries. Because of this I use actions on my submit button,
( if action=edit) {blah blah blah}
else blah blah

If a users make and addition everything is fine, butif they press the back button, the action is carried out again. (because the action is in the url (www.blahhblah.com/form.php?action=add)

this puts duplicate entries into the database, which is easy to fix, but annoying.

Is there a way with PHP to force the timeout page everytime they try to re-enter the form from their back button?

Problem With Back Button
On submitting a form a php script is called to validate the form. I did the validation with javascript code integrated in the php script. I know its not the proper way to do the validation but...

The problem is that if I dn't fill in the form..and click on the back button..the validation script is executed and i got an error message popup.I want the validation script to be executed only when I click on the submit button.Is this possible? But still I must use the form action so that I could retrieve the values in the validation script.

Back Button With Sessions
I have a set of pages that keeps track of the user by using sessions in PHP4. It works well with one major exception - using the back button produces a "Data Missing" error a lot of times.

BACK Button In Browser
I would like the browser to refresh the page when I'm clicking BACK
button. Does anybody know how to do that?

Back Button And Get Request...
I've made a script for managing shoppingcart (something like
cart.php?action=add&item=12345) and it works fine, the problem is: when user
hits the back button page after he added something in the cart, the add cart
script is rerun and he ends up with having 2 of the same item. Is there a
way to prevent script from running when accessed via back button?

Sessions And Back Button
I am developing a web site with a section only for registered users and
using sessions to control the access to these pages.
I have the problem with the "back" button of the browsers, especially
in IE.
When I go back within the controlled zone IE always display the message
"page expired" and mozilla displaying the advise that you are trying to
access to a post data page etc..

I am wondering if there is a way to avoid this "problem" a save the
users to think what to do when they see these messages, letting them to
go back and forth until they get out of the session.

Catching The 'Back' Button
I'm wondering if there's a way to catch when the user clicks the 'Back' button from a specific page.  When this happens, I need to run a system call that deletes everything in a session-specific directory.  The systems call would look something like this: system('rm -r /home/websites/genework/html/DATA/'.$Sess_ID.'/*');

So, the only thing left is the snag involving the catch of the 'Back' button.  Javascript has a way to catch this action (window.onbeforeunload), but the tap-dancing that would be required to get PHP to activate the system call is extremely ugly and I'm not even sure it'd work.

Back Button Error
After submitting a form from a PHP script and using the back button I
get a page cannot be displayed error. Everything works find except when
the back button is used. Using IE with SP2 on Windows XP Pro any ideas?

Back Button On Browser?
is there a way to disable the Back button on the browser? i would like to prevent users from using it to go to the previous page!

Sessions And Browser Back Button
I originaly wrote a script that passed variables from script to script via query strings. When I did that, the user was able to use the back button to go back to previous pages and change form inputs. Then I changed my scripts to use session variables to get rid of the long query strings. Now, when the user hits the back button: "Warning Page has Expired" is what they get. Why is that?

Back Button POST Issue
Is there any way of disabling the repost of information when a user
hits the back button?

Is the only way to do this to actually use some sort of redirect on the
page receiving the initial post (though this won't stop them hitting
back twice and possibly reposting will it?)

Unable To Use The Back Button On The Browser
On my site, which uses sessions to log in and track users, if the back button on the browser is used the page times out and says you have to hit the refresh button to refresh the page you were trying to get back to. Not very user friendly, anybody have any ideas why??

There is a function called do_authentication that is called at the top of every page to check the user has logged in and has the appropriate rights. I don't think it is to do with the sessions though as if you hit the refresh buttin on the page with the error you are allowed back to the page you were trying to get to?

Browser Back Button/caching And Php
Can the browser back button or browser caching be turned on or off via php?

Back Button Gives An Expired Warning
When I click the back button on a page generated by php, to go back to a listing page generated by php, I get this:

Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you. To resubmit your information and view this Web page, click the Refresh button.

Detecting/Disabling Back Button Using PHP
I was wondering if there is a way to disable or detect when a user presses the browser back button in PHP.

What I want to do is that when a back button is pressed, the page reloads.

Please let me know if there is a way to do this. If any of you use modernbill, it has that feature.

Back Button, Page Expired, GET And POST
I have read you can solve the back button problem with the page expiration by using GET method instead of POST. When I use the GET method with form data, it doesn't work.

I have a page with a dropdown submitting to a page getting the variable via POST. Then it links to another page, and I want them to be able to come back to the second page. When I use GET instead of POST I get an error.

Refresh Page After Hitting Back Button
I have a page with Dropdowns that are linked to a database.
After selecting one of the options and going to the next page, it will display the results of that dropdown item as pulled from the database.

If a user hits the back button, then selects a different option and hits "submit", what is listed is the results of the first selection AND the results of the second selection.
Is there a way to either:
1. Refresh the page upon hitting the back button on the browser
2. upon hitting the back button, the browser forgets the selection previouslly made.

Browser's Back Button Whipes Out Data
I am building forms that as the user to 'hit there browser's back button' to correct or complete their information. Sometime (on a pc and mac) with the latest version of IE ... You hit the back button and the data is gone. Is their a proper fix for this?

Breaking The BACK Button (Refresh Problem)
I have a php page which serves up multiple pages based on how the user
interacts with it - there are links on the first page that will reload (from
the same php file) a new page with form fields and submit buttons, and when
a user posts from that new page (or cancels), then the same php file is
again loaded, detecting how the user responded and generating the
appropriate html for whatever should be none next. All very typical.

What I want to know is, is there a way so that once a user has posted from
some submit button from one page (we'll say he Cancel's from a page that had
a form Cancel button so he returns to the original non-form default page
generated from the php file), can it be made so if the user then "refreshes"
the new page (hits the Refresh or Reload browser button) he does NOT get the
browser's "The page cannot be refreshed without resending the information.
Click Retry to send the information again, or click Cancel to return to the
page that you were trying to view." dialog? In other words, what I'd like is
a way to have the browser think that there was no posting done (even though
there was) once I've generated this certain 'home' page with my php code, so
that user ReLoad's of the page won't get this warning.

This is probably related also to problems I've had with "breaking the BACK
button" on sequences of php pages: if the user BACK's up to a page that was
generated by a post, it may not even be possible to regenerate the original
page.

Hitting The Back Button Displays Last Search
I have a website where people can perform searches. Once they find what they're looking for they can click the link and get more details on an item. The problem I'm having is that people read the details and then hit the back button. Here they get a message warning them how the browser needs to resubmit the data that was entered in the search form or they're sent back to the search page.

How can I cache the search terms or search results so if the person hits the back button they get the results of the previous search and not a message or are not sent back to the search page?

Page Has Expired, BACK-button -problem
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?

Sessions And Losing Data With Back Button
I've implemented the FormValidator.class (recent DevShed article) on a current project. So if a user leaves out something on a form, and clicks submit, they'll get a message saying "blah is missing, use browser's back button and try again". So the user goes back and all their data is waiting for them in the form.

If I try the same thing on a form page the requires a session, and they press their browser's back button, all of the data is reset on that form! Is there anyway around this?

Shopping Cart Navigation And Back Button Browser
I am building a shopping cart where the user adds items to his shopping cart and shippes some to himself and others to someone else as a gift.

I do the following thing, First let the user fillout his info and I ask him to check which items does he want to send to himself. Once he hit submit button I do the following.

1) I process which poduct does he want to ship to himself. Then I remove those products from the shopping cart.

2) Then if he has items in his shopping cart remaining I display address form and checkboxes asking user to check all items that he want to ship to this address.

then I repeat step 2 until the user has no more items in his shopping cart. when he has no items I will display billing page.

Here is my problem if user hits back button in the browser and then enters submit button I have not items in the shoppingcart since I removed them from his shopping cart the first time he processed his form.

So how do I deal with back button in the browser. I have no idea how to it when I have multiple forms.

Back Button Doesnt Display Previous Page
Here is an example of my code. PHP Code:

Upload File Having Browse Button And Submit Button On Same Form
I am building a form where the user must upload a picture and fill in his
details.
Now I have a problem as all of this is on the same form.

How will I be able to have the Browse button to open the "file browse"
dialog
and the Submit button to submit the form data.

As I believe you can not use GET but must use POST method for form.
Is there any means that I can use GET cause I need to get form variables
from URL as well.

Clicking Browser's Back Button Shows An Empty Page
On my website www.lahabitacionroja.com developed using Php I am experiencing the following problem:

When a user with MS Explorer 5.0 or older clicks the back button on the browser it shows an empty page...
If you try with MS Explorer 6.0 this problem doesn't happen.

Does anybody why it happens and if there is any easy solution??

Is it a browser issue, an Apache issue....

Pressing "SUBMIT" VS Pressing ENTER
I have a little weired problem .

A PHP function attached to a form produces wrong resutls when i perss ENTER insread of pressing the SUBMIT button by mouse ? How can that be solved ?

Force Reload Of Page When User Press "Back" Button
Is there a way to force a page to reload if a user har pressed the "Back" button in the browser.

"Warning: Page Has Expired" - How To Aviod When Using Browser Back Button?
In summary:
I want to a form to submit information via a HTTP POST, however, when using
Internet Explorer I want to be able to use the back button and all the
information retained. Presently we get a "Page has expired" message. How can
we avoid this?

Full details:
Having searched for postings on how to avoid the "Page has Expired" they are
numerous, however, I have not found one that answers the question
adequately.

Hence this posting.

One posting directed me to the following webpage:
http://in.php.net/session_cache_limiter

but I played around with "session_cache_limiter()" and it did not give the
desired results. (It seem to make no difference). Also many people say to
use HTTP GET instead but this is not an option in this case.

Where can I find concise definitive information on how to avoid "Warning:
Page has Expired" and allow the user to press the back button and see the
form as it was before they submitted it?

Form Has Memory
I'm trying to fill form fields with values from a mysql record using
php. The problem is that when I move to a new record, the form still
displays the old data! The html source is updated but the previous
record is still displayed even after hitting refresh. Running the code
in a new window shows the correct result until I move to a new record.

Getting Link To Act As "back" Button?
I've wrote a script that does calculations based on user input from two select boxes and two text fields. The results of the calculations show up on a second page. Where I'm having difficulty is I put a "try again" link on the results page to take the user back to the input page, which refreshes the page. When the "back" button is used on the browser, though, the info the user input/chose is still there. Most of the time the user will only need to change one field for multiple calculations, so the "back" button is ideal.

Is there a way I can make the "try again" link act as the "back" button on a browser?

1 Form To Another And Back
how can i have a form with submit button open in a new page from where i select some options and sends and refresh data from this new page back to the old one Code:

How To Go Back After Form Post ?
Whats the best way to allow a user to go back to an input form after doing a submit, and still have their data in the form ?

Form Reset When U Go Back
How do i stop reseting form inputs..when u go back in the browser I use sesession before printing forms. Session is just check whether user is login or not if they login then redirect to member section if not show the form.

When you enter login information and if it is wrong .user need to go back and resubmit the login information. When u go back u need to type all information again which is just wasting time.

Preventing Visitors Ability To "re-visit" A Page Via The "back Button"..
I have a rather complex registration/member sign up form.. which gets a little confused, when a visitor "backs" completely out of the form, then for whatever reason returns to the form. The form contains 'cancel' buttons, which naturally cancel the reg process and redirects them to the document just before they started.

JS provides us with the "location.replace()" method, but I can't seem to find a way to coordinate the use of location.replace() with the posting of the form values. In short, I want to "replace" the first step of the form with the "second step".

I think what's making this tricky, is that each step of the form are located within the "same" page (register.php). The document works like so: The first step is the "Member Agreement" when they click "agree" (submit) the system creates a new row in the temporary register table of the db.

It then issues a registration cookie, which carries the row id, and session value. in addition (for those cookie impared users) we carry the row id and session value in hidden elements. So far, as long as the user continues through the process all is fine, but if they (for whatever reason) back all the way out, and click 'agree' again, the process fails.

I guess I have to find a way to force a reload of the 1st step "if they've gone back" OR "replace()" the first step with the second, so as to prevent the user from going "back" to the 1st step of the register page.

Passing Form Data Back Into The Same Script?
I am looking for a really simple example of passing submitted form data back into the same script. I've found quite a lot of stuff online about it, but none of which mentions the new $_POST globals and stuff. This is all that I want to do...

1. First run into the script, displays form
2. Form data submitted, same script run but check is made on $_POST variables (is isset() the best and safest function to use for this?). If all variables are present, skips to form processing code. Otherwise, reshows form with previously entered fields.

I must admit, it's been a while since I've done any PHP and since moving to my new host (running a lot newer version of PHP, with the $_SESSION globals etc...) I'm more than a little confused as to the safest way of going about doing sessions.

For form submitted data do I refer to it as $_POST['whatever'] throughout my script or is it acceptable to reassign them to locals at the top of every script? And does the same apply for $_SESSION?

Free Form Builder Utility With PHP Back End
I've developed a free interactive utility that will
generate the bones of an HTML form with PHP processing.
Its very simple to use and is just the ticket for getting the
structure of a form in place. About 10 times a year I seem to
have to do this chore so I decided to automate it and share.
Let me know what you think, you can provide feedback on the site
or send me an email..


Copyright © 2005-08 www.BigResource.com, All rights reserved