Browser Back After POST
I got an annoying problem using the POST-method to send a form's data:
I put a login-form on the page which is sent by the POST-method to itself.
After that the content of the POST-variables will be checked
(!empty($_SESSION['xyz'])) and the rest of the page included.
In order to show some informations (e.g. "Welcome John Doe") and becoming
independent of specific POSTs, the data is also written to
SESSION-variables.
Now if I go to another page (by link) and after that back to the login-page
by the browser's "back"-button, it cannot be displayed ("The page cannot be
displayed...").
Only if I actualize the page it is displayed regularly.
I know that this problem doesn't appear by using the GET-method, but because
of security reasons I have to use POST.
So what can I do to fix that problem?
I don't want to disable the browsers back-button (or use some JavaScript).
View Complete Forum Thread with Replies
Sponsored Links:
Related Messages:
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 !
View Related
$HTTP_REFERER On Browser Back
I'm using HTTP_REFERER to see what pages are being looked at before a member of my site comes to my HOME page. HTTP_REFERER works perfectly if the previous pages viewed are linked to the HOME page and they use the link to get to it. However, if they type in the address of the HOME page into the browser or scroll backwards or forwards to the HOME page the HTTP_REFERER does not work. Any ideas on what I am doing wrong or what I can do?
View Replies !
View Related
Stop Browser Back
I am creating a user rating system and have done it all apart from one thing that is baffling me. Once the user has submitted the form how do I stop them from just hitting back and submitting it again? I have got a cookie system that stops them from re entering it going forward but this does not stop them just hitting the back button and voting again.
View Replies !
View Related
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 !
View Related
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?
View Replies !
View Related
Trapping The Browser Back Button
I'm working on a web application that consists of two PHP files. The first is intended to do all the display work based on SESSION variables. The second file processes all of the _GET and _POST data, sets the necessary SESSION data then redirects to the first page. This process seems to work well while operating the application, but fails miserably when the user uses the Back button on the browser. Since the application bases it's state on SESSION variables, the Back button has no effect at all.
View Replies !
View Related
User Selects Browser Back Button
I using a alert JavaScript message to display once an user submits a form, the message displays fine, but say the user goes to another screen and hits the browser back button, the same message displays again, is there a way to clear the message once displayed the first time.
View Replies !
View Related
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.
View Replies !
View Related
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 !
View Related
POST BACK
Can anybody tell me how to get rid of the error when you hit the back button after posting a form. Is it because the form is being posted n i should rather send data thru the URL.
View Replies !
View Related
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 !
View Related
Form Post And Go Back
I have a form which has two list boxes for sorting the results data displayed on my page. If i click an item from the results data, view the details of that item and then click the back button in Internet Explorer my results page displays the results fine. However, if i happen to change the list boxes and post the form to filter the results even further, then click an item and then click Go Back I always receive a 404 page cannot be found error message and i have to refresh the page in order to display the results. Firefox simply pops up a message saying 'click OK to resend the POSTDATA' and all works fine once you click OK. I am implementing Friendly URLS' so this means I can't use GET for my form action because it will append loads of rubbish to my URL (?listbox1=asc&listbox2=all) etc Has anyone got any solutions on how to avoid this IE page from displaying the error message when I click to Go Back to my search results page?
View Replies !
View Related
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?
View Replies !
View Related
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 !
View Related
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 !
View Related
Handle Post Data Then Send It Back To The Server
Im setting something up where i need to handle post data then send it back to the server. the bit im struggling on is i dont know how to send post data without submiting it through a form? this is how the thing needs to work. outside server sends post data[no problem] -> my server sends post data back to there server. so how do i send post data to a url without using a submit button how do i just send the post array to a server?
View Replies !
View Related
POST Variables - Strings Passed Back From A Credit Card Processor
I'm having real trouble making sense of strings passed back from a credit card processor to my site via <input> tags. the customer buys more than one product, I get the following in the passback: Code: <input type="hidden" name="product_id" value="2" /> <input type="hidden" name="product_id1" value="1" /> <input type="hidden" name="quantity" value="5" /> <input type="hidden" name="quantity1" value="3" /> and so on. I need to match 'quantity1' to 'product_id1' etc. and then input them into the MySQL database into a table called 'orders'. Each product order gets its own row, but is linked by the client_id. I have set up the following 'foreach' loop, PHP Code: foreach($_POST as $key => $value) { $title = preg_replace('/[^a-z,A-Z]/','',$key); $str = "$title[0]$title[1]$title[2]$title[3]$title[4]$title[5]$title[6]$title[7]$title[8]";.
View Replies !
View Related
"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 !
View Related
File_get_contents - Making A Browser Within Browser
im making a browser within browser (dont bother asking why), but the problem is when i use file_get_contents, it works, however, the original HTML doesnt use absolute locations of images etc... so it tries to look for them on my server . I tried using str_replace to change it but i cant distinguish between things which are relative and absolute references...
View Replies !
View Related
Post And Redirect With Post Data
The solution we have though up is the following: 1. The user fills in data in a form and hits submit - This submits (POST) to another page (redirect.php) 2. redirect.php adds more POST data to POST and then submits all this POST data to another page (offsite [payment portal]) The reason why we have to do this is for someone who knows our to read html source code, could easily find the sucessful page which will then do the processing we need to do on our side. Which means freebeis.
View Replies !
View Related
Go Back
I have made a delete script which deletes messages and once deleted it comes back "this message has been deleted", how do i make it so i can add "click here to go back to where you was". A bit more info, this is for a simple forum system which has topics which change the url to like topic.php?id=5 so how do i make it so it can link or automatically go back to that page.
View Replies !
View Related
CSV--and Back!
I have a sortable table in PHP that draws its data from a CSV file. This much works. But I have very limited PHP experience and I'm having trouble with this next step: I'd like to create a simple form in PHP allowing a viewer to add a record (a row) in the CSV file. I've been unable to find a script as simple as I'd like--and trust me I have looked. While I am here, are there any precautions you recommend I take in making this table freely editable? I have a login system so I could require users to register before submitting data, but honestly I don't want to hamper anyone from contributing, at least initially. I could use a word/B.S. filter that prohibit invalid entries, if anyone has a script for that or any other anti-spamming measure.
View Replies !
View Related
PHP Post, Then HTML Post?
Using PHP, I want to POST or GET some variables to a second php page. This, I already know how to do. However, on the second php page, I want to use a simple, standard HTML form using the standard form-submitting method such as: <form action="https://orderpage.ic3.com/hop/orderform.jsp" method="post"> whereupon both sets of variables --- the earlier variables that were POSTed or GETted to the second page, along with the standard form variables derived within the second page --- will be POSTed to the above URL. In the second page, might I actually translate the received variables into actual HTML code? For instance, if my first page POSTed the variable xyz to the second page, then might the following code on the second page receive that variable and then include it when the second page's "Submit" button is pressed? <? $xyz=$_POST['xyz']; ?> <INPUT TYPE="HIDDEN" NAME="xyz" value="<?=$_POST['xyz']?>" > Or how, otherwise, might this be done?
View Replies !
View Related
Getting Back To Where I Started.
I use a login script and since it's accessable from every page on my site I would like the user to go back to the place where he started. I use a template file in which the loginfields are placed and where I call a different .inc for each other page, so it doesn't make sense to hard code the 'gobackurl', is there a function to retrieve the pageurl from where the user came or another solution, let me know?
View Replies !
View Related
Welcome Back....your Last Visit Was...
I would like to add a feature to my site on the main page that says the following: Welcome back, Joe user! Your last visit was July 20, 2002. I figure I could do this by using sessions (which I plan to use for other tasks anyway) and inserting/updating info in a table for user_sessions, but how would I (in PHP) get the last visit info (assuming the user has already logged in)?
View Replies !
View Related
Back After Logout
I have created a web in the 1st page. User can login. After login i start the session and save it in his db-record. Also the page give a link to my important page. In that page I check the saved sid and current sid. If both are equal, it will display some details, that page have the logout link.when user click that link. The logout.php will work. It generate a new sid for the same user. my problem is after logout when the user back from logout.php it will show all contents of the my important page. If refreshing that page it didn`t show anything. So how can i make sure that when the user back it automatically refresh the page.
View Replies !
View Related
BACK Problem
I have a page that takes some parameters. They are used to add items to a cart: add_cart.php?itemid=1234&vid=9876 This takes me to the cart page (as in "View Cart" page.) The problem I have is that if I click on the BACK button, I get another (of the same) item added to the cart because "add_cart.php?itemid=1234&vid=9876" is executed again.
View Replies !
View Related
Back Link In Url
i have a page where the user needs to be logged in in order to use it, so if they are not logged in it sends them to the login page. once they login it should send them to the page they were trying to go to. the problem is that the url keeps the login page and just adds the new url at the end. here is the code any ideas? PHP Code:
View Replies !
View Related
Getting HTML Back!
I have a record in a database which contains 'The Enter Key' (moving down a line) in it a couple of times. when i fetch it and echo it on a page, it is like it has changed them for spaces... can anyone give me code to re-HTML it?
View Replies !
View Related
Different Back Grounds
i have a dating website so when a member signs up they get there own profile page almost like every other dating site out there what i what to do is give them the option to change there profile page template to other templates i will have up for them can anyone tell me how this can be done?
View Replies !
View Related
Passing Value Back
I can't figure out how to do it. so if i have this code $count = 5; somefunction($count); echo "$count <br>"; -------------------- somefunction($count) { $count = 1000; } but obviously the echo will print off 5, not 1000, which is what I want. w3schools goes on about the return syntax but that only works when the function is returning 1 value.
View Replies !
View Related
Bounce Back
I am currently writing a login script and I want login.php to send the user back to where he/she was when hitting the "login" button... Just like it's on this forum. If youre logging in while viewing a thread youre, after the login is compelte, being taken back to the same thread. Is there like a bounce back code or something?
View Replies !
View Related
Back Link In Php?
How do I make a link that takes me to the previous page? I have a list of thumbnails, when I click on one of these a big picture shows. When I click on the big picture I want to go back to the previous page, just like pressing the back button in explorer.
View Replies !
View Related
Back Door Php
I am thinking of installing a script on my site from a company called Verotel. I wonder if anyone has looked at this script or would be interested to look at it to check that it has no back doors to my web content. I have attached it to this post as an attachment. You can get it directly from the Verotel website as well. A bit about verotel: Code:
View Replies !
View Related
|