Jump to content

Don't Back Up


cbrooks

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.