MySQL Forums
Forum List  »  Newbie

where to stick "PASSWORD()"
Posted by: cadex
Date: July 04, 2005 09:38AM

Hello, until I get better at MySQL and PHP I am relying on Dreamweaver to pull me through as best as it can. I'm thinking about taking a course, but I'll ask your opinion in my next post.

Anyway, I have a script which checks a user's password with one in mySQL and it uses the PASSWORD() function so that paswords aren't stored in plain text. Now, I am writting the registration page for employees to create their own accounts, but I've tried putting the PASSWORD() function in different places but nothing i've tried has worked. Any suggestions?

$insertSQL = sprintf("INSERT INTO user (username, password, firstname, lastname, address_1, address_2, city, province, postal, phone_area, phone_num, fax_area) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['username'], "text"),
GetSQLValueString($_POST['password1'], "text"),
GetSQLValueString($_POST['firstname'], "text"),
GetSQLValueString($_POST['lastname'], "text"),
GetSQLValueString($_POST['address_1'], "text"),
GetSQLValueString($_POST['address_2'], "text"),
GetSQLValueString($_POST['city'], "text"),
GetSQLValueString($_POST['province'], "text"),
GetSQLValueString($_POST['postal'], "text"),
GetSQLValueString($_POST['phone_area'], "text"),
GetSQLValueString($_POST['phone_num'], "text"),
GetSQLValueString($_POST['fax_area'], "text"));

mysql_select_db($database_connect, $connect);
$Result1 = mysql_query($insertSQL, $connect) or die(mysql_error());

Thanks a bunch!

Options: ReplyQuote


Subject
Written By
Posted
where to stick "PASSWORD()"
July 04, 2005 09:38AM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.