SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Case-Sensitive

  1. #1
    Wadge! F4nat1c's Avatar
    Join Date
    Oct 2005
    Location
    South Wales, UK
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Case-Sensitive

    Hi,

    How do i make a form field case sensetive? For example if they signed up with the username BLaHbLaH and then tried to log in using blahblah, then it would throw back an error. I know this may be quite annoying for people who have long, up and down usernames, but I have a "Remember Me" function to fix that.

    Thanks in advance .
    OMFG SitePoint ROXORZ TEH BIG ONE111!
    Wish you were invisible?

  2. #2
    SitePoint Guru aamonkey's Avatar
    Join Date
    Sep 2004
    Location
    kansas
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    how are you comparing the usernames now?
    just a simple
    if ($_POST['username'] == $valid_username)
    will do it....

  3. #3
    SitePoint Wizard
    Join Date
    Jan 2004
    Location
    3rd rock from the sun
    Posts
    1,005
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wouldnt you just use strtolower() before you stored it in the database?

    Then use the same function before you validate is again, as aamonkey said?

    That way the user could carry on using/incorrectly using MixeDCase?
    isempty()


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
  •