![]() |
|
|
Welcome to the { mindfrost82.com } forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
case sensitive password problem
I have created a login page useing DW8 (php and mysql). Upon testing the
behavior on my site, I discovered that my passwords were not case sensitive. The password BigBoy will pass the same as bigboy,BIGBOY, or any other variation of case. How do I set my password to respond to only the proper case entry? Is there any specific settings i need to make to the mysql table? Cheers, |
|
|||
|
Re: case sensitive password problem
phpStumped wrote:
> The password BigBoy will pass the same as bigboy,BIGBOY, or any other variation > of case. How do I set my password to respond to only the proper case entry? Is > there any specific settings i need to make to the mysql table? Cheers, SELECT queries are case-insensitive. To perform a case-sensitive search, you need to add BINARY before the value being searched for. If you have used the Dreamweaver Log In User server behavior, you need to go into Code view to amend the SQL query, which should look something like this: $LoginRS__query=sprintf("SELECT username, pwd FROM users WHERE username=%s AND pwd=%s", GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); Change it to this: $LoginRS__query=sprintf("SELECT username, pwd FROM users WHERE username= BINARY %s AND pwd= BINARY %s", GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); That will enforce case-sensitive searches for both username and password. -- David Powers, Adobe Community Expert Author, "The Essential Guide to Dreamweaver CS3" (friends of ED) Author, "PHP Solutions" (friends of ED) http://foundationphp.com/ |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|