PHP Form Validation |
PHP Form Validation |
dougmanic |
Nov 25 2006, 10:00 PM
Post
#1
|
Newbie Group: Members Posts: 19 Joined: 3-October 06 Member No.: 320 |
I'm trying to validate a form using PHP, so that if a user enters a empty value in any of the fields (I have text boxes, drop-down options and radio buttons), data will not be submitted and a red error text will appear above the field.
I tried creating a function that will check if each of the required fields are entered. If they are, data will be saved; if not the form will be printed again with the error. But the problem here is that all the input that the user entered disappears and all the options are unselected. Is there anyway else to do this? This post has been edited by dougmanic: Nov 25 2006, 10:00 PM |
Lo-Fi Version | Time is now: 28th April 2024 - 03:34 AM |