Problems with profile.php Problems with profile.php
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Problems with profile.php

Started by JohannM, April 27, 2007, 11:25:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JohannM

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 ?




Nibbler

You have an comma there where there shouldn't be

user_notify = 'Yes',  WHERE user_id = '1'

JohannM

Thanx Nibbler

Stupid me, how could I missed that !

Now it tells me another user has registered with that email address !