View Full Version : submit form authentication letter casing

01-25-2004, 02:46 PM
Firstly, sorry for the title. I was unsure how to word what I wanted.

Scenario is, I have an input box with a submit button, and this is checked with a cell in the database.

so if inputtext = databasetext then it's true, else false.

At the moment though, this only checks text that is exactly the same and does not account for letter casing.

so if "this answer" = "this answer" then true,
but if "This Answer" = "this answer" it's false.

I want to be able to have it so that the information is checked and disregards the casing, so a user can submit the forum with no caps, all caps, or a variation, and it checks the answer for the letters, numbers and such, not for the casing.

Hope this makes sense


01-25-2004, 02:54 PM
Use strcasecmp(). Have a look at the example at

01-25-2004, 03:13 PM
So easy when you know how :)

Thanks very much, works like a charm (or a ChArM - which although annoying typed like that, it would work too) :thumbsup:


01-25-2004, 04:04 PM
if your doing it via the dateabase then just do the check in there:

"SELECT ID FROM table WHERE field LIKE $var"

then just check that it has returned a row.

01-25-2004, 11:45 PM
Readme.txt is right : compairing the two values should be done by your database. Always.

all databases have both casesensitive (like in mySQL, the blob-types) and non-casesensitive (in mySQL, the text-columntypes) so you should use the right columntype to solve your problem.