469,289 Members | 2,228 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

Username validation against db

daJunkCollector
Hey. I am using mysql, php, and javascript (jquery).

I have a nice form setup where the username field validates AJAX-style against my database... this technique allows for the user to see if his username is already in use, while he is typing.

Problem is, I am only validating against the the exact (case-sensitive) value returned from the database. I want to make sure there can't be a user 'pete' and 'Pete'.

Any suggestions would be appreciated. ATTN: Moderators, this post may belong in either PHP or MySQL... I don't know if there is a fancy select statement I could use, or php method to compare against.

Thanks,
Pete
Apr 11 '09 #1
3 1380
....i could ignore capitalization to begin with...?
Apr 11 '09 #2
sorry...been up too late. strtolower() will work.
Apr 11 '09 #3
Dormilich
8,651 Expert Mod 8TB
that depends on your DB settings. just in case, there are uppercase and lowercase functions both in PHP and SQL.

you could also make a trial... (you know what users are already in the DB)
Apr 11 '09 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

21 posts views Thread by Stefan Richter | last post: by
67 posts views Thread by Scott Meyers | last post: by
2 posts views Thread by Sudip Chakraborty | last post: by
15 posts views Thread by Eugene Anthony | last post: by
6 posts views Thread by lists | last post: by
24 posts views Thread by runway27 | last post: by
1 post views Thread by hrishy | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.