Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.