Hi
Hoping someone has some experience with this.
I have an insert record which works perfectly, until I try and encrypt the passwords and set the date to NOW()
When I submit the form - the form does not complete successfully, however a record of some kind is inserted into the table.
The problem is that the fields become out of cync. i.e. the values are not inserted into the correct field.
Any help would be invaluable. I'm using the dreamweaver authentication, but need to tweak it for the obvious security reasons of having to encrpyt the passwords.
Please let me know if you need any more of the code.
Many thanks
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "register")) {
$insertSQL = sprintf("INSERT INTO user_registration (reg_agent, reg_joindate, reg_lname, reg_fname, reg_companyname, username, password, password2, reg_tel, reg_email) VALUES (%s, NOW(), %s, %s, %s, %s, SHA('password'), SHA('password2'), %s, %s)",
GetSQLValueString(isset($_POST['reg_agent']) ? "true" : "", "defined","'Y'","'N'"),
GetSQLValueString($_POST['reg_joindate'], "date"),
GetSQLValueString($_POST['reg_lname'], "text"),
GetSQLValueString($_POST['reg_fname'], "text"),
GetSQLValueString($_POST['reg_companyname'], "text"),
GetSQLValueString($_POST['username'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['password2'], "text"),
GetSQLValueString($_POST['reg_tel'], "int"),
GetSQLValueString($_POST['reg_email'], "text"));