#1
  1. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    I seem to be having a bit of a difficulty,
    I am try to do a match of a users form entered password.

    I've been trying this:
    SELECT * FROM users WHERE password=PASSWORD('$theirpassword');

    naturally the $theirpassword is the users
    password.

    MySQL isn't returning a match.. when I know the password is entered correctly...

    any any any idea what/why?

    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.
  2. #2
  3. No Profile Picture
    Robert_J_Sherman
    Guest
    Devshed Newbie (0 - 499 posts)
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by Robert_J_Sherman:
    I seem to be having a bit of a difficulty,
    I am try to do a match of a users form entered password.

    I've been trying this:
    SELECT * FROM users WHERE password=PASSWORD('$theirpassword');

    naturally the $theirpassword is the users
    password.

    MySQL isn't returning a match.. when I know the password is entered correctly...

    any any any idea what/why?
    [/quote]

    I've solved my own problem, it appears that I just didn't set my password field (in the database) to the right length.. guess I just didn't realize that the field needed to be something like VARCHAR(50) in order for the comparrisons to work out..



    ------------------
    SnR Graphics,
    Low Cost Hosting and Web Development.

Similar Threads

  1. password generation on user auth.
    By nacho_c in forum PHP Development
    Replies: 14
    Last Post: January 16th, 2004, 04:55 AM
  2. Replies: 1
    Last Post: January 7th, 2004, 06:41 PM
  3. Matching form password with MySQL encrypted one...
    By crMN1 in forum PHP Development
    Replies: 2
    Last Post: April 16th, 2003, 12:03 PM
  4. Matching columns from multiple tables
    By jstone35 in forum MySQL Help
    Replies: 2
    Last Post: October 23rd, 2002, 12:14 PM
  5. pattern matching in multiple columns
    By Daan Verbaarschott in forum MySQL Help
    Replies: 2
    Last Post: October 6th, 2000, 04:53 AM

IMN logo majestic logo threadwatch logo seochat tools logo