RE: [PHP] Password checking
| From: | Matt Williams | Date: | Tue, 05 Sep 2000 14:30:58 +0000 |
| Subject: | RE: [PHP] Password checking | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15300@lists.php.net to get a copy of this message | ||
Hi
What field type is password in your database?
If it is a password field you will need to offer your password as
PASSWORD($password) in your query otherwise it will return no results. Even
then you can't check the result against the variable in the form as the
output from the db will be the encrypted one, but if it returns a result you
will know it is the correct password.
just a thought
M@
> -----Original Message-----
> From: Wee Chua [mailto:Chua@mail.interclean.com]
> Sent: Tuesday, September 05, 2000 03:03
> To: 'Krznaric Michael'; PHP (E-mail)
> Subject: RE: [PHP] Password checking
>
>
> Yes, I tried everything from what Julie suggested me to change on the
> statement.
>
> -----Original Message-----
> From: Krznaric Michael [mailto:mkrznaric@rand.com]
> Sent: Tuesday, September 05, 2000 10:15 AM
> To: 'Wee Chua'; 'julie@thickbook.com'; PHP (E-mail)
> Subject: RE: [PHP] Password checking
>
>
> Did you try using && instead of "and"?
>
> Mike
>
> -----Original Message-----
> From: Wee Chua [mailto:Chua@mail.interclean.com]
> Sent: Tuesday, September 05, 2000 9:51 AM
> To: 'julie@thickbook.com'; MySQL (E-mail); PHP (E-mail)
> Subject: RE: [PHP] Password checking
>
>
> Hi Julie and all,
> I tried your solution but it is still not working. I tried to take away
> ($row["password"] == "$password") and rest works fine. I don't what
> is
> wrong with my ($row["password"] == "$password") statement, please help!
> Thanks in advance.
>
> Calvin
>
> -----Original Message-----
> From: Julie Meloni [mailto:julie@thickbook.com]
> Sent: Tuesday, September 05, 2000 9:59 AM
> To: Wee Chua
> Cc: MySQL (E-mail); PHP (E-mail)
> Subject: Re: [PHP] Password checking
>
>
>
> > if (($row["user"] == $username) and (($row["password"]) ==
> $password) and
> > ($username !=""))
>
> Try:
>
> if (($row["user"] == "$username") && ($row["password"] ==
> "$password")
> && ($username != ""))
>
>
> - julie
>
> +------------------------------------------------+
> | Julie Meloni (jcm@i2ii.com) |
> | Tech. Director, i2i Interactive (www.i2ii.com) |
> | |
> | "PHP Essentials" & "PHP Fast & Easy" |
> | http://www.thickbook.com/ |
> +------------------------------------------------+
>
>
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/php/manual.php"
> before
> posting. To request this thread, e-mail mysql-thread49757@lists.mysql.com
>
> To unsubscribe, send a message to:
> <mysql-unsubscribe-Chua=mail.interclean.com@lists.mysql.com>
>
> If you have a broken mail client that cannot send a message to the above
> address(Microsoft Outlook), you can use
> http://lists.mysql.com/php/unsubscribe.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>