Re: MySQL password problem

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: MySQL password problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13370@lists.php.net to get a copy of this message
>$query = "select * FROM tblUsers WHERE UserID='$username' AND >PW=PASSWORD('$password')"; >$result = mysql_query($query, $conn); * Are you sure you 'PASSWORDED' (hashed) the password when you did the initial insert? * Is the password filed in your DB called 'PW' (uppercase) or 'pw' (lowercase)?? Russ Do you get an error message or does the user you try to exctract seem not to exist? On Tue, 16 Oct 2001 08:26:29 -0700 Eric Kilgore <kilgore@teleport.com> wrote: > Anyone have any ideas what is wrong with this query? I have been unable to > get this to work with the password function. > > It works if I change the password field in MySQL to unencrypted text and > remove the password function from this query but fails when the data is > encrypted. > > Any help would be appreciated. > > $query = "select * FROM tblUsers WHERE UserID='$username' AND > PW=PASSWORD('$password')"; > $result = mysql_query($query, $conn); > > > Eric Kilgore > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > #-------------------------------------------------------# "Believe nothing - consider everything" Russ Michell Anglia Polytechnic University Webteam Room 1C 'The Eastings' East Road, Cambridge e: r.j.michell@apu.ac.uk w: www.apu.ac.uk/webteam www.theruss.com #-------------------------------------------------------#

« previous php.db (#13370) next »