form validation - registration

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
Anant
Forum Commoner
Posts: 66
Joined: Wed Jul 14, 2010 11:46 am

form validation - registration

Post by Anant »

Hi,

There are so many ways to validate the form but can any one tell me one best way to validate. I am not interested in Javascript one as there might be people with js disabled. And which can validate email etc..
Jsphlane20
Forum Newbie
Posts: 17
Joined: Wed Aug 11, 2010 1:17 pm
Contact:

Re: form validation - registration

Post by Jsphlane20 »

You would have to first provide the type of information you will be validating. Do you only want to validate email only ?
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: form validation - registration

Post by califdon »

Anant wrote:Hi,
There are so many ways to validate the form but can any one tell me one best way to validate. I am not interested in Javascript one as there might be people with js disabled. And which can validate email etc..
If there was any such thing as "one best way", why would anyone ever use any other ways??????
There are many ways precisely because there are many things to be validated and many levels of validation. If you don't want to use JS because of the 5% of browsers with JS disabled, you are burdening your site's interaction for the other 95% of visitors. Not such a good idea. I recommend using both JS validation and server validation (which you should always use if you are going to interact with a database, certainly).
Post Reply