...

View Full Version : submit form authentication letter casing



murphyz
01-25-2004, 01: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

Mxx

mordred
01-25-2004, 01:54 PM
Use strcasecmp(). Have a look at the example at
http://us2.php.net/manual/en/function.strcasecmp.php

murphyz
01-25-2004, 02: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:

Mxx

ReadMe.txt
01-25-2004, 03: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.

raf
01-25-2004, 10: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum