Jump to content

Recommended Posts

I am creating a web site (using PHP) for a client and when a user enters information and then if he/she were to use the browsers backup key it might be confusing (for some people) seeing that the values that they entered had be reset. so the user might feel that the site had lost their info, when infact their info had be saved.

Question: Can you turn 'OFF' the backup key on the users browser for the duration that they are on your site, forcing the user to use only the menu options on the site?

 

Thanks

According to 'Hillary' It takes a village to raise an Idiot! And My mother thanks you for your assistance in raising hers!

Link to comment
https://forums.phpfreaks.com/topic/177920-dont-back-up/
Share on other sites

just have the form auto-populate each field with either the entries from the db, or from session variables .. whichever way you're handling it, ie.

 

echo '<input type="text" name="foo" value="'.(isset ($_SESSION['foo']) ? $_SESSION['foo'] : '').'" />';

 

something like that, anyways.  will be different code obviously if you are taking from the db.

 

last thing you want to do is make the user feel trapped, 'cause if they want to go back, they'll go back .. if they can't go back 'cause you took that option away, they'll close the page.

 

much easier to create proper functionality to begin with than to take it away.

Link to comment
https://forums.phpfreaks.com/topic/177920-dont-back-up/#findComment-938087
Share on other sites

With at least FF and IE, about the only way the browser would not keep the values in the form fields when using the back/forward buttons is if your script has redirected to the form page at some point in time without putting the current values into the value='' attributes (see what mrMarcus wrote in his post above.) When you do a header() redirect, that causes the browser to fetch the URL that is the target of the redirect. What is your actual code?

Link to comment
https://forums.phpfreaks.com/topic/177920-dont-back-up/#findComment-938098
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.