View Full Version : Recover data!!
pavmoxo
08-07-2006, 09:16 AM
What can I do when I forgot one field of a form that is necessary and lost all data that I Input when I submit.
How can I recover that data for submit correctly??
Press the back button.
Most browsers store the current form data (except the password) in memory for something like five pages away from the form in which it was entered.
pavmoxo
08-07-2006, 09:56 AM
I tried in Firefox and Maxthon with no results. A friend tell me that have a relation with header browser but he don´t know how to catch the data when submit or refresh the page!! Have you more ideias??
mwinter
08-08-2006, 11:37 AM
What can I do when I forgot one field of a form that is necessary and lost all data that I Input when I submit.
How can I recover that data for submit correctly??
Are you asking this question as a user, or as an author trying to help users that forget to include details?
Mike
pavmoxo
08-08-2006, 03:00 PM
Are you asking this question as a user, or as an author trying to help users that forget to include details?
Mike
As programmer for help users!!!
mwinter
08-10-2006, 12:54 AM
As programmer for help users!!!
Have the PHP script handle both form generation and validation; submit the form to itself. If there errors, regenerate the form using the submitted values as the defaults (rather than the normal values), and insert error messages as appropriate.
Mike
djr33
08-21-2006, 08:04 AM
Here's a simple example:
<?php
if ($_GET['var'] != "") {
if ($_GET['var'] > 5) {
$check = 1;
}
}
if ($check != 1) {
if ($_GET['var'] != "") {
echo "Value not over 5. Please try again.<br>\n";
}
else {
echo "Please enter a value over 5.<br>\n";
}
echo "<form action=\"\" method=\"get\"><br>\n".
"<input type=\"text\" name=\"var\"><br>\n".
"<input type=\"submit\" value=\"send\">\n".
"</form>";
}
else {
echo "You entered a value over 5. Good job.";
}
Basically, that will write a form, and ask you to put in a value above 5. If you do, and submit, it says so. If not, then it will say you didn't, and leave your value in the textbox.
The same ideas can be applied in a lot of ways.
See: http://thebrb.com/stockpile?act=submit
I wrote that using the same ideas.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.