Realtime Form Validation

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gasper000
Forum Newbie
Posts: 8
Joined: Sun Dec 07, 2008 1:48 pm

Realtime Form Validation

Post by gasper000 »

Well, I have made a registration form & I want to apply the realtime validation process. I spent days searching online trying but it seems it's pretty hard for a beginner. I want client/server sides realtime validation to be able to validate the following:

1. Username: a)Checks if the username is already taken or still available.
b) Validates that the username is different from the Nickname, first name & last name.

2. Password: The form asks the user to type his password & then retypes it again. I want to validate that both entries are the same.

3. E-mail address: The form asks the user to type his email & then retypes it again. a) I want to validate that both entries are the same.
b) Checks if the email already registered before or not.
c) Validates the email format.

4. Nickname: a)Checks if the Nickname is already taken or still available.
b)Checks if the Nickname is different from the username, first name & last name.

5. First Name - Last Name: Validates that both are different from the Username & Nickname.

6. Country: Validates that the user IP is the same as the IP of the country he/she selected.

7. Birthdate: Validates that the user does not enter wrong date like 31/02/1999.

8. Validates the length of all the previous fields.



I know that's much work to do but even if you find it complicated or you have no time, you may drop some of the requirements (although all are important) or give me simple easy examples that are suitable for a beginner. That's really urgent. Thank you for your time.
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Realtime Form Validation

Post by Mark Baker »

gasper000 wrote:Well, I have made a registration form & I want to apply the realtime validation process. I spent days searching online trying but it seems it's pretty hard for a beginner.
You won't find how to do this in "realtime", but if you search with a keyword of "Ajax" you might find your solution
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Re: Realtime Form Validation

Post by dude81 »

Well most of your problems could be solved with client side validations i.e through Javascript. And 1 a) and 4 a) have to be done on server side i.e with PHP.
For each of this you search either this forum or google saying Javascript what ever field name validation and on PHP side, you need to query your users table in the database and need to validate.
Post Reply