How can I check if username already exists in database or not.
shenbagam 0 Newbie Poster
Recommended Answers
Jump to PostIf you want "Username" to be the same as "userNAME" instead of them being 2 different users (I.e.: you don't need to type your username exactly how you did when you signed up) you should use the toupper(); function:
if(toupper($result["username"]) === toupper($username)) { //user exists } else …
Jump to PostJust an extra, perhaps you could ajaxify the name check so that users don't have to submit the form with all their details before being told that username is already taken.
All 8 Replies
chrishea 182 Nearly a Posting Virtuoso
purushothamj 0 Newbie Poster
R0bb0b 344 Posting Shark
Dragonbaki 4 Junior Poster
Borzoi 24 Posting Whiz

diafol
shenbagam 0 Newbie Poster
joehms22 18 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.