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

 

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!! =)

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.