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

    Join Date
    May 2000
    Rep Power
    How can I verify with PHP a Password that i saved in a MYsql-database with the function PASSWORD() ??

    i have saved the password with:

    $result = mysql_db_query("databse","insert into table (user,pass) values('user1',password('hello'))");

    now i would like to compare the password in the databse with the entered password in a form!
    can anybody help me??
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Rep Power

    First check it out wether password is existing in the database or not.After that you can insert the value into the database.

    $result = mysql_query("select * from table where pass='$pass'",$con);

    if mysql_num_rows($result)==0{
    // Now save record here
    echo "Error!! Hit Back and Change the Passwordn";



    SR -

    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. Perl, MySQL password verification
    By planetjanet in forum Perl Programming
    Replies: 2
    Last Post: January 17th, 2004, 04:06 PM
  2. password generation on user auth.
    By nacho_c in forum PHP Development
    Replies: 14
    Last Post: January 16th, 2004, 04:55 AM
  3. Replies: 1
    Last Post: January 7th, 2004, 06:41 PM
  4. want password protect?
    By CaptinKirk in forum Beginner Programming
    Replies: 4
    Last Post: December 18th, 2003, 12:00 PM
  5. password verification with php4 and mysql
    By hmiz in forum PHP Development
    Replies: 2
    Last Post: August 2nd, 2003, 08:38 AM

IMN logo majestic logo threadwatch logo seochat tools logo