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??
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.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
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??
Are you asking this question as a user, or as an author trying to help users that forget to include details?Originally Posted by pavmoxo
Mike
As programmer for help users!!!Are you asking this question as a user, or as an author trying to help users that forget to include details?
Mike
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.Originally Posted by pavmoxo
Mike
Here's a simple example:
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.PHP Code:<?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.";
}
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.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks