• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

PHP / MySQL

Question

ctx48    0

I have a form with a password field to register the password for the user and when it sends the info to the script it will add username, name, everything else, but the password always remains blank in the mysql DB.

This is the code i am using to add the info to the mysql DB

$query = "INSERT INTO users SET
                       username='{$username}',
                       password=PASSWORD('{$password}'),
                       first_name='{$first_name}',
                       last_name='{$last_name}',
                       address='{$address}',
                       city='{$city}',
                       zip='{$zip}',
                       msn_sn='{$msn_sn}',
                       aim_sn='{$aim_sn}',
         state='{$state}',
         email='{$state}'";
$result = mysql_query($query, $connection) or die(mysql_error());

Any hint on what might be wrong with my code?

CTX

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Trix.Neo    1

Have you tried.... :

password=PASSWORD({$password})

or

password=PASSWORD('$password')

if not might be worth a try, trial and error?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.