Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP Databases
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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
 
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
 
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
 
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
 
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
 
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




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





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.