Hi there
I created new fields in my sQL database for users. I fixed and added some code to register.php, which pars all correct information.
I also fixed the profile.php page, but now get an error: " There was an error while processing a database query. "
This is the sql return:
While executing query "UPDATE cpg1410_users SET user_location = 'ZA-CT', user_gender = 'Male', user_age = '26-35 years', user_hometel = '021-4330396', user_worktel = '021-4330397', user_mobile = '0839545093', user_address = 'PO BOX 5460
CAPE TOWN
8000', user_occupation = 'Self Employed', user_paymentmethod = 'EFT - Wire Bank Transfer', user_beestatus = 'White/Caucasian', user_notify = 'Yes', WHERE user_id = '1'" on 0
mySQL error: You have an error in your SQL syntax near 'WHERE user_id = '1'' at line 1
and this is the line in my profile.php page:
$sql = "UPDATE {$CONFIG['TABLE_USERS']} SET " . "user_location = '$user_location', " . "user_gender = '$user_gender', " . "user_age = '$user_age', " . "user_hometel = '$user_hometel', " . "user_worktel = '$user_worktel', " . "user_mobile = '$user_mobile', " . "user_address = '$user_address', " . "user_occupation = '$user_occupation', " . "user_paymentmethod = '$user_paymentmethod', " . "user_beestatus = '$user_beestatus', " . "user_notify = '$user_notify', " . ($CONFIG['allow_email_change'] && !$error ? ", user_email = '$email'" : "") . " WHERE user_id = '" . USER_ID . "'";
What can be the problem ?
You have an comma there where there shouldn't be
user_notify = 'Yes', WHERE user_id = '1'
Thanx Nibbler
Stupid me, how could I missed that !
Now it tells me another user has registered with that email address !