Jump to content

[SOLVED] Can PHP ignore big and small letters?


insejn

Recommended Posts

 

I've created a simple admin-area where username/password is stored in a database. Pictures and files and so on are stored in folders connected to the username. So if someone named Bengt logs in he will open a folder called "Bengt" and show everything inside of that folder..

 

The problem here is if he logs in with the username "bengt", with the "b" as a lower case.. then the admin area can't find the folder because it searches for a folder with a big "B (Bengt)..

 

Is there a smart solution for this? Perhaps make it impossible to log in with a lower case word? or is there something with PHP that can ignore big and small letters? ..but how do I do that? :S

 

/Bjorn

 

Link to comment
Share on other sites

Where do you get the username from? The database should have the same case as the folder on the disk.

 

<p></p>

I put the username that is in the logged in $_SESSION and store it in a variable, for example "Bengt", and then I use a script that shows everything in a folder that has the same name as the variable.

 

 

Maq:

Do I use that command to make sure that "Bengt" logs in with lower casing as "bengt"?

 

 

Thank you for the responses!! =)

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.