forums
new posts
donate
UER Store
events
location db
db map
search
members
faq
terms of service
privacy policy
register
login




UER Forum > Private Boards Index > Tech Talk > PHP form validation (Viewed 1378 times)
mazatec 


Location: Birmingham, AL
Gender: Male
Total Likes: 0 likes




 |  |  | mazatec.suroot.com
PHP form validation
< on 11/11/2005 9:08 PM >
Reply with Quote
Posted on Forum: UER Forum
Does anyone know of a good library to use for PHP form data validation? I'd like to avoid PEAR if possible.

Yeah, this is a weird question, but I'm sure that someone here does web development...

I may just have to write my own. It would be good practice anyway.




stealthy 


Total Likes: 1 like


You got a problem bro?

 |  | 
Re: PHP form validation
< Reply # 1 on 11/11/2005 10:18 PM >
Reply with Quote
Posted on Forum: UER Forum
Posted by mazatapec
Does anyone know of a good library to use for PHP form data validation? I'd like to avoid PEAR if possible.

Yeah, this is a weird question, but I'm sure that someone here does web development...

I may just have to write my own. It would be good practice anyway.


Are you talking about seeing if an email is in the right format (i.e., [email protected])? Because you can just use javascript for that. Check out this sitepoint article, and let me know what you think

Basically the rule of thumb (nowadays) with a web developer is, why refresh a page when you don't have to? Less clicks = more of a 'stay' rate for users. Hence why AJAX has simply exploded in the community lately. I mean, it's been around for a while, but Google really brought it to fame with things like Gmail, etc.

Anyways, good luck

Edit: And re-reading your original post: I absolutely hate PEAR. The idea is nice and all, but it just makes for an incredible amount of laziness and possible security flaws. If you don't know everything about the libraries you're using, you can be prone to making security holes on your site if you implement these libraries the wrong way. [of course, I'm not saying there are security problems with PEAR... but I am saying it encourages laziness - and moreover, encouraging, or rather discouraging, researching articles relating to php on the internet. It's just that you're able to say "oh, i need a library, let's go to PEAR".] end rant ;)



[last edit 11/11/2005 10:24 PM by stealthy - edited 1 times]

mazatec 


Location: Birmingham, AL
Gender: Male
Total Likes: 0 likes




 |  |  | mazatec.suroot.com
Re: PHP form validation
< Reply # 2 on 11/12/2005 6:12 PM >
Reply with Quote
Posted on Forum: UER Forum
The problem with that is you can turn off Javascript and enter an invalid address. The data needs to be verified at the backend so that malicious users can't enter bad data.

This is also for user names, passwords, birth date, etc, and all fields need to fall within certain parameters (length, alphanums only, etc).

I can probably just check against regular expressions, but if I write it from scratch I have to be really careful (this step is just before a last-minute check and a mySQL database).




UER Forum > Private Boards Index > Tech Talk > PHP form validation (Viewed 1378 times)


Add a poll to this thread



This thread is in a public category, and can't be made private.



All content and images copyright © 2002-2024 UER.CA and respective creators. Graphical Design by Crossfire.
To contact webmaster, or click to email with problems or other questions about this site: UER CONTACT
View Terms of Service | View Privacy Policy | Server colocation provided by Beanfield
This page was generated for you in 93 milliseconds. Since June 23, 2002, a total of 740599506 pages have been generated.