Jump to content

Update PASSWORD()


postbil.com

Recommended Posts

Hello Phpfreaks.

I have created a function in a PHP script the user is able to change password but I get always a coward when I try to run the script. I use the function PASSWORD () to encrypt the user password ..

Here's the error I keep getting ..

  Fatal error: Call to undefined function password ()

 

Here is my MYSQL code ...

    $ db = mysql_connect ( 'localhost', 'root','') or

        die (error. ');

    mysql_select_db ( 'postbil', $ db) or die (mysql_error ($ db));

 

                      $ query = 'UPDATE site_user SET

            password = " '. mysql_real_escape_string (PASSWORD ($ password), $ db).'"

           

          WHERE

            email = " '. mysql_real_escape_string ($ _SESSION [' loginname '], $ db).'" ';

        mysql_query ($ query, $ db) or die (mysql_error ());

        mysql_close ($ db);

 

I very much hope there is someone who can help me .. What am I doing wrong?

In advance thank you very much!

 

Link to comment
https://forums.phpfreaks.com/topic/181600-update-password/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.