Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
PHP Databases Using PHP in conjunction with databases. PHP questions not specific to databases should be directed to one of the other PHP forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 20th, 2006, 01:29 PM
Authorized User
 
Join Date: Apr 2006
Location: bikaner, raj, India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to chayanvinayak
Default case sensitivity neglection

i am using php/mysql ,my authentication page does not handle case sensitivity, user can enter to secure area by entering
password :aaa or password: AAA .
please suggest me the solution

chayan vinayak goswami
__________________
chayan vinayak goswami
Reply With Quote
  #2 (permalink)  
Old April 20th, 2006, 01:53 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

Depends on how you're authenticating the password. What algorithm are you using?? md5? MySQL's built-in password? Is the password stored encrypted?

I need more information before I can "suggest you the solution". For instance, show me the relevent bit of PHP code where password authentication is happening.

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote
  #3 (permalink)  
Old April 20th, 2006, 02:19 PM
Authorized User
 
Join Date: Apr 2006
Location: bikaner, raj, India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to chayanvinayak
Default

i have not use any encryption , i have used following script:
<?php

mysql_connect("localhost", "game_cvg", "cvg");
mysql_select_db("game_accounts");
session_start();
$userid = $_GET['userid'];
$password = $_GET['password'];
$status = 0;

$result = mysql_query("
SELECT credits FROM accounts
where userid = '$userid' and password = '$password' LIMIT 1");


if ($result && @mysql_num_rows($result)) {
// $status = 1;
include(gallery.html");
}
else{
$status = 0;
}


echo $status;

?>

chayan vinayak goswami
Reply With Quote
  #4 (permalink)  
Old April 20th, 2006, 02:27 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

> i have not use any encryption , i have used following script:

I beleive you have to change the collation of the column so that all queries performed against it are case-sensitive.
http://dev.mysql.com/doc/refman/5.0/...nsitivity.html

HTH!

Regards,
Rich

--
Author,
Beginning CSS: Cascading Style Sheets For Web Design
CSS Instant Results

http://www.catb.org/~esr/faqs/smart-questions.html
Reply With Quote
  #5 (permalink)  
Old April 20th, 2006, 10:42 PM
Authorized User
 
Join Date: Apr 2006
Location: bikaner, raj, India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to chayanvinayak
Default

thanks richard.york , problem eradicated...

chayan vinayak goswami
Reply With Quote
  #6 (permalink)  
Old April 22nd, 2006, 01:56 AM
Authorized User
 
Join Date: Apr 2006
Location: bikaner, raj, India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to chayanvinayak
Default

when i give query :
SELECT * FROM accounts WHERE userid='$userid' AND password='$password' COLLATE latin1_general_cs

it give following error.

cannot execute query: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLLATE latin1_general_cs' at line 1

chayan vinayak goswami
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Case Sensitivity in Crystal Report Er_M_Singh C# 2 September 12th, 2007 12:03 AM
Comparing on case sensitivity trab Access 2 September 19th, 2006 07:09 AM
Context sensitivity not working vijayma VB How-To 1 April 21st, 2006 03:43 PM
Solution for Case Sensitivity on *nix Servers themartorana Pro PHP 1 August 16th, 2004 10:23 AM
search string either Upper case or lower case rylemer Beginning VB 6 3 March 24th, 2004 04:23 PM



All times are GMT -4. The time now is 02:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.