People,

I am new in this mailing list and new to mysql, so sorry if this question 
has been asked before repeatedly.

I am developing a user table where my highschool alumni can register and 
set their own password to access the member function using php.  I found 
from the document that I can store the password using the PASSWORD token so 
that it will be encrypted.  It is working.
The problem is when I am trying to retrieve the password back and trying to 
compare it from what the user entered through a form.
The idea is I am doing a select where the user id and the password match 
==> returning only 1 row when valid.
However, it seems like my select statement doesn't work.  Any idea how I 
can do this???

This is how I do the select:
SELECT level from userdetails where userid='xxxxxx' and 
pwd=PASSWORD('yyyyyyyy')
and I also tried
SELECT level FROM userdetails where userid='xxxxxx' and 
pwd='PASSWORD('yyyyyy')'

Both failed.  I can see why both of them failed.  However, lacking the 
experience doing a query (just mostly do a simple select, insert, update) 
prohibited me to accomplish what I am trying to do.

Any hints and help anyone can offer?

FYI, just in case these information may be helpful: using php4 on a linux 
(redhat) cannot tell what version of MySQL used by my host.  the table was 
created with the pwd as a VARCHAR(15)  <--- will this long enough to held 
the encrypted password??

Thank you.
Iwan. 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to