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.
View Complete Forum Thread with Replies
Related Forum Messages:
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?
View Replies !
Retaining Form Data On Hitting Back Button
When a user fills out a form on my site, hits submit and then presses the back button the filled in data is gone. I know this is browser specific, however the work around in IE is adding header("Cache-control: private"); to cache the data. This work around does not work for Mozilla Firefox. My question is simply, does anyone know of a way to fix this for all or most browsers?
View Replies !
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.
View Replies !
Page If Back Button
I have a php page which is a sign up page, once signup is finished the user is redirected to a new page. Sometimes (and it's rare) the user hit's the back button and then re-submits the form etc. I mean like I said it's rare but still bothers me, so on the last page I kill all the sessions. Which only works if the user hits the back button but the page is refreshed. So basically I want to know if it's possible that when the back button is hit to refresh a php page?
View Replies !
Refresh Page After Submit Button
I have a form inside a PHP page. When user fills user input and hits the submit button, the changes are reflected in the mYSQL database immediately but the PHP page itself isnt updated immediately. If i hit the Refresh button, the changes arent reflected on the page still. But when i go back and come back to the PHP page, the changes are reflected.
View Replies !
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.
View Replies !
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?
View Replies !
Handle User Hitting The Browser Refresh
What are best practices to check to see if a .php script is called for the first time versus a user hitting a refresh button on their browser? I am playing around with a PHP front-end to a database. If the user enters values in a form (form.html), hits submit, the PHP script (insert.php) puts the submitted fields into the database as intended. insert.php displays a success message if successful or an error message otherwise. If the user hits the brower refresh button while at insert.php, the data is re-entered, and I end up with a duplicate entry in the database. This is the default behavior of Opera. IE prompts if I want to resend the data vs. not doing anything. If the data is resent, then the duplicate entry happens. I need to guard against this either way.
View Replies !
Hitting Back, Form Info Not Passed On
I have a form that will retrieve information from a database based on variables passed in a link. Order=17 would pass on the order number which is used to connect to a MySQL database. Now, if I hit back on a browser after opening one form page up already and click on a new link, say &order=18 the form will load blank without anything filled in, so basically it seems like it didn't connect to the database or didn't make use of the order=18. I call upon these using a GET method. Here's something that me be of issue, the form is filled in if this condition is met: if ($_GET['firstTime']='YES' && $_SESSION['second']!= 'true')
View Replies !
Back Button To Previous Multi Purpose Page
the index page passes paramiters tot he view page to telling it what to view. then the user can go to the delete page to delete on of the items viewed. from the delete page I want to the user to go back to the viewpage using the same paremiters. Is there a simple way to just do a back link or do i need to pass the paremiters to the delete page then back again?
View Replies !
Function By Hitting A Button
i've got a function and i want that this function got "runned" if some hit a button: my code for define the function (echo "hello world" is just a dummy for a much more complicated command): <?php function test() { echo "hello world";} ?> and the button: <input type="button" value="GO" onClick="test()">
View Replies !
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....
View Replies !
Log Out - Page Expired Not Working Or Pressing Browser Back Button
I am a problem with I logout from my site. When I push log out link I send it to a new page with this script in this: <?php session_start(); session_unregister($SESSION); session_destroy(); unset($SESSION);?> In each page I have this other script #accesscontrol.php <? session_start(); if (session_is_registered("SESSION")!= FALSE ) # ya la sesion existe entonces la cargo { #Maybe I use after. } else {echo "<h1>Sorry...</h1>"; echo "<A href = "index.php"><H4> Login Univernet</H4> </A>"; session_destroy(); exit;}?> The problem is when I log out and press the back button I am back to the pages. Sometimes it tells me that page expired but if I reload the page everything is ok and all my "security" pages are available.
View Replies !
Hitting Enter On A Form Instead Of Clicking The Button
I'm getting incorrect response when hitting the enter key instead of actually clicking the button on a form. It activates but the post data [value='Update'] isn't being sent I think. The php generated page flickers & reloads but doesn't perform the update. This is php generated, I'm just pasting the page source (reformatted & extra junk removed and I think they are now identical), and it's running on my localhost apache server for testing so maybe there's something funny with my setup. Crossposted to html & php groups. Must click button (no enter): <form action='?SC=cart.php' method='POST'> <tr> <td> <input type='hidden' name='item' value=��'>name </td> <td> <input type='submit' name='buy' value='Update'> </td> <td> <input type='text' name='item_qty' size=Ƈ' value=ƈ'> </td> </tr> </form> Enter or click works fine: <form action='?SC=cart.php' method='POST'> <tr> <td> <input type='hidden' name='item' value=��'>name </td> <td> <input type='submit' name='buy' value='Update'> </td> <td> <input type='text' name='item_qty' size=Ƈ' value=ƈ'> </td> </tr> </form> Here they are without me fixing up the formatting: Must click button (no enter): <form action='?SC=cart.php' method='POST'><tr> <td><input type='hidden' name='item' value=��'>Adiantum jordanii / - 1 gal</td> <td><input type='submit' name='buy' value='Update'></td> <td><input type='text' name='item_qty' size=Ƈ' value=Ƈ'></td> <td>$ 9.00 </td><td>$ 9.00 </td><td>0%</td> <td>10%</td> </tr></form> Enter or click works fine: <form action='?SC=cart.php' method='POST'><tr> <td><input type='hidden' name='item' value=��'>Adiantum jordanii / - 1 gal</td> <td><input type='submit' name='buy' value='Update'></td> <td><input type='text' name='item_qty' size=Ƈ' value=ƈ'></td> <td>$ 10.00 </td><td>$ 20.00 </td></tr></form> <tr><th colspan=Ɗ' align='right'>Tax:</td><td>$ 1.70</td><td> </td></tr> <tr><th colspan=Ɗ' align='right'>Delivery:</td><td>$ 0.00</td><td> </td></tr> <tr><th colspan=Ɗ' align='right'>Order Total:</th><th>$ 21.70</th> <th><form action='?SC=checkout.php' method='post'><input type='submit' name='checkout' value='Checkout'></form>
View Replies !
"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?
View Replies !
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.
View Replies !
Go Back 2 History Pages And Refresh
I have a multi page CMS and after a page is edited through forms and php I want to get back to the page that has been edited shown below Page to be edited.php - > updateform.php -> updateProcessing.php - > Page that has been edited.phpWhat is the most efficient way to accomplish this? Code:
View Replies !
Refresh Page - Or An Absolute Refresh Not Reload.
If the image content for image1.jpg changes, but the file name image1.jpg does not, IE6 does not show the new content unless F5 is pressed. If I reload the page using http://domain.com/view_pictures.php the image does not change. If I use a header("LOCATION: http://domain.com/view_pictures.php"), the image does not change. I have tried several ideas to force the reloading of the image file with no little success. I cannot change the image file name. Even if I add another a second image, the first image does not change. IE must use the file name to determine if it should reload the file. But F5 works. Is there a means in either php or JavaScript to call (force) a F5-keyboard command? or an absolute refresh not reload.
View Replies !
Refresh (back?) Causing Browser To Resubmit Form
Ive got a form on my site where users are registering and paying for a service, which is submitted to a 3rd party site which takes care of the financial aspect and then forwarded to a confirmation screen on my page. It seems as if some users are hitting the back button and resubmitting the data, as they are being registered multiple times. What would be a good way to get around this, so they could not go back to the page where the form was submitted and therefore re register?
View Replies !
Cant Use The Back Button
I cant use the back button after entering a thread. Instead, nothing happens. I suspect its those damn popup ads in the right hand column that are preventing me from existing a thread. Can somebody take a look at this?
View Replies !
Back Button
I have a page in my site where a user give an exam, The problem is that If he wrong answer the q and then he know that the correct answer is C, So he go back and come again to that page and mark C as a correct answer. I dont want that from users. I want that if he or she click on the back button Then a message will comeout that save ur score. OR If he or she click the back button of the browser the page remain the same.
View Replies !
Disabling The REFRESH BUTTON?
I have a page: customize.php The page has two submit buttons using CSS to give them an image. <input type="submit" name="AddToCart" src="../images/customize_addcart.jpg" class="AddToCart" value="" alt="Add To Cart"> <input name="PriceUpdate" type="submit" class="PriceUpdate" value="" src="../images/customize_updateprice.jpg" alt="Add To Cart" /> At the top of the page. I have an IF STATEMENT that will determine which BUTTON has been clicked on. If the "AddToCart" button has been clicked > The information is sent to the Shopping cart and and page is redirected to cart.php using "header function" When the user clicks on the "PriceUpdate" button the page will recalculate the total price based on the selections from the POST variable... PROBLEM IS: Once the user clicks the "PriceUpdate" button - if they click on the refresh button on their browser window. A warning ALWAYS comes up saying: " The page can not be refreshed without resending the information. Click Retry to send the information again, or click Cancel to return to the page you were trying to view. " How can I make is so this message will not occur -OR- Bypass this message -OR- Just make it so that the Refresh button on the browser does not do anything if clicked.
View Replies !
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.
View Replies !
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.
View Replies !
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!
View Replies !
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?
View Replies !
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.
View Replies !
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.
View Replies !
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?
View Replies !
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.
View Replies !
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.
View Replies !
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?
View Replies !
Can Not Go Back On The Previous Button Using The ID's
Imagine a database with only two fields: ID + TEXT. Imagine a .php page to handle it. I have a next, previous and delete "buttons". The problem is when I delete a entry from .php page to database, I can not go back on the previous button using the ID's, because one will be missing, and no message will be displayed.
View Replies !
Browser's BACK Button
I actually want to deactivate the browser's "back button" action when a user has accidently forgot to logged out his session and opened another website in the same window without logging out his session. I have noticed such faults with rediffmail.com.Â
View Replies !
Execute With Back Button
I need that when the user goes back to the last page with the "Back" button of the browser, the page executes the php code again. Is there any code to insert in php that implies a reload every time the page appears in the user browser?
View Replies !
Prevent BACK BUTTON
say i have 5 items in a shopping cart and hit a button to delete them all. i will then be shown a shopping cart with 0 items(or any empty cart message). but if i hit the BACK BUTTON in my browser the shopping cart would still show 5 items in it. what strategy could be used to get around this? is there something that could force the page to refresh once it's loaded? or a way to make the page pull in the proper quantity whether it's being loaded or reached by the back button?
View Replies !
Back Button Dilemma
I am creating a file sharing web application. When a user edits an existing file -- by clicking the edit link for the file on the "directory view" page (which displays a list of all files in that "directory) -- the file's checkout value is changed from Ɔ' to Ƈ' to indicate that it has been checked out. This means that other users that visit the "directory view" page will not be given the option to edit that file. Code:
View Replies !
Back Button Resubmitting Sql
I click the back button, it looks like my mysql queries are running again. It's like the previous page isn't cached and it's rerunning all the queries. Is this a setting I need to set in mysql, php or apache? For instance if a page has a "select * FROM table ORDER BY RAND() LIMIT 5" and I go to the next page. When I click back a new set of 5 will show up. I want it to be the same page that was created before.
View Replies !
Refreshing Form Without Using Refresh Button
how to refresh a form fields without using Refresh button? instead, i want to use arrays. that's what I do whenever I want to refresh my textfields in the form...the variables listed below are the names of my textboxes... $Title = '' $CallNum = '' $CatalogDate = '' $LCCN = '' $ISSN = '' $CatalogSourceCode = ''
View Replies !
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?
View Replies !
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?)
View Replies !
|