Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Checking username(upper and lower)

  1. #1
    Senior Member analyzer's Avatar
    Join Date
    Mar 2011
    Posts
    101
    Thanks
    4
    Thanked 3 Times in 3 Posts
    Rep Power
    3

    Default Checking username(upper and lower)

    I was trying to check username in my login form that when someone puts username which is not exactly the same with the registered username, he/she will fail to login. Example. . Registered username is tEst and password is test, when someone tried to log in using "test" as username it will not log in because letter "e" must be "E". So it should be "tEst". How will i'am going to verify that?

  2. #2
    Member
    Join Date
    Nov 2010
    Posts
    45
    Thanks
    0
    Thanked 23 Times in 6 Posts
    Rep Power
    0

    Default

    check with phpmyadmin if the Collation of your username column is latin1_swedish_ci
    alternatively you could use strtolower() on your login page

  3. #3
    Senior Member analyzer's Avatar
    Join Date
    Mar 2011
    Posts
    101
    Thanks
    4
    Thanked 3 Times in 3 Posts
    Rep Power
    3

    Default

    The collation is latin1_swedish_ci but still doesn't work. I check it in my sql using, WHERE username='".$username."'

  4. #4
    Administrator GumSlone's Avatar
    Join Date
    Mar 2005
    Location
    Mars, GumCity
    Posts
    1,495
    Thanks
    125
    Thanked 573 Times in 201 Posts
    Blog Entries
    2
    Rep Power
    10

    Default

    Quote Originally Posted by analyzer [Only registered and activated users can see links. Click Here To Register...]
    The collation is latin1_swedish_ci but still doesn't work. I check it in my sql using, WHERE username='".$username."'
    PHP Code:
    WHERE username LIKE '{$username}' 
    Advertise your mobile site for FREE with [Only registered and activated users can see links. Click Here To Register...]

    [Only registered and activated users can see links. Click Here To Register...]


  5. #5
    Senior Member analyzer's Avatar
    Join Date
    Mar 2011
    Posts
    101
    Thanks
    4
    Thanked 3 Times in 3 Posts
    Rep Power
    3

    Default

    I'll try it bro, thanks!

  6. #6
    Senior Member CreativityKills's Avatar
    Join Date
    May 2009
    Location
    Lagos
    Posts
    844
    Thanks
    0
    Thanked 106 Times in 62 Posts
    Rep Power
    4

    Default

    use character encoding utf8_general_ci, and make sure your username column is a UNIQUE key
    [Only registered and activated users can see links. Click Here To Register...]

  7. #7
    Junior Member
    Join Date
    Mar 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    try strtolower($username);

  8. #8
    Senior Member Ghost's Avatar
    Join Date
    Jan 2007
    Location
    Cardiff, Wales
    Posts
    295
    Thanks
    12
    Thanked 138 Times in 37 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by arevel [Only registered and activated users can see links. Click Here To Register...]
    try strtolower($username);
    this makes all characters lowercase. but the original poster wants to check for case "insensitive" characters.
    so the user is able to use both upper and lower case at same time.
    <?php
    include ('Ghost');
    if ($Post == true) {
    echo '


    alt='coding-talk.com!!' />';
    echo 'Sharing Is Caring!';
    } else {
    echo '

    alt='the username GHOST has been comprimised!' />';
    echo 'OMG SOMEBODY HELP ME!!';
    }
    ?>

  9. #9
    Member
    Join Date
    Apr 2012
    Posts
    80
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    2

    Default

    $xtreme = strtolower ( $username );

    and get ur sql output with strtolower , then it ll be ,k . Hmm

  10. #10
    Member
    Join Date
    Jun 2009
    Location
    Latvia
    Posts
    92
    Thanks
    11
    Thanked 1 Time in 1 Post
    Rep Power
    4

    Default

    Quote Originally Posted by GumSlone [Only registered and activated users can see links. Click Here To Register...]
    PHP Code:
    WHERE username LIKE '{$username}' 
    thats a nice server killer. and what if there`s about 1kk users + every second one of them (or more) tries to login?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. auto email checking script
    By pmbguy in forum Scripts Forum
    Replies: 1
    Last Post: 11-06-12, 08:58
  2. Change username
    By Leviathan73 in forum Coding Forum
    Replies: 4
    Last Post: 02-08-11, 20:06
  3. Mod_Rewrite(username)
    By whitewingz in forum Coding Forum
    Replies: 8
    Last Post: 05-03-11, 03:52
  4. how to blocked username like this?
    By arg0s12 in forum Site / Script testing and error fixing
    Replies: 27
    Last Post: 17-12-09, 11:46
  5. Username problem
    By Ponick in forum Site / Script testing and error fixing
    Replies: 10
    Last Post: 10-09-09, 17:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19