Thread: Password-Verify

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    109
    Rep Power
    15
    How can I verify in PHP a Password that i saved in a database with the function PASSWORD() ??
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    32
    Rep Power
    15
    Assuming $password is the password, pass is the field, and whatever is the table, you could do something like:

    if(
    mysql_result(mysql_query(select pass from whatever where pass=password($password)),0,0))

    But if you're only using password() for this basic authentication it would be better to just use PHP's crypt() function...
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    109
    Rep Power
    15
    1. Thanxs for the first solution. I must test it...

    2. Can you show me an expample how to use the crypt() function with php and mysql!? I have just tested it, but it doesn't work!

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. want password protect?
    By CaptinKirk in forum Beginner Programming
    Replies: 4
    Last Post: December 18th, 2003, 12:00 PM
  4. password generator- unique?
    By David Graham in forum MySQL Help
    Replies: 1
    Last Post: September 9th, 2001, 05:54 AM
  5. password generator- unique?
    By David Graham in forum PHP Development
    Replies: 1
    Last Post: September 9th, 2001, 05:51 AM

IMN logo majestic logo threadwatch logo seochat tools logo