Page 1 of 1

password function

Posted: Tue Nov 29, 2005 8:19 am
by bxm_3
When I insert the password using the password function.


E.g
password($PASSWORD) I just get the sql not executing, while if I insert using
password($PASSWORD) what is inserted is password($PASSWORD) .

When I browse the table contents I see the password field as password($PASSWORD).

If I try an output the function using password($PASSWORD) I get the error.



Fatal error: Call to undefined function: password() in /content/StartupHostPlus/o/l/olol.org.uk/web/insert_registration.php on line 89

I thought the password function was suppose to insert the password in the format 6a55tggg222555ggg

Posted: Tue Nov 29, 2005 8:21 am
by Grim...
There is no password() function in PHP.
Try crypt()

Posted: Tue Nov 29, 2005 10:04 am
by pickle
password() is a MySQL function. It's used like this:

Code: Select all

INSERT
INTO
    my_users
    (username,
     password)
VALUES
    ('joe',
     password('joespassword'))