The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> PHP Form Validation
dougmanic
post 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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th April 2024 - 03:34 AM