I'm writing a form in using php and html. This form has validation control. when I submit the form all the textboxes get empty and if the user has filled for example 3 of 5 inputs , because if those two inputs he/she now has to fill those 3 inputs again. How can I prevent the form from emptying the inputs by submitting the form?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Is there a way to play audio on a mobile browser w
i thought of javascript:
You can find all about is on: http://www.w3schools.com/js/js_validation.asp
It works great, when user lets the field empty, it will say: "Name must be filled out". The submit will do nothing until you fill that...
//sorry for bad english
check if form field is set in $_REQUEST array or not, print its value accordingly
If you validation script and form code are in this same file you can just put $_POST values into form.
EDITED after comment RiggsFolly.