// SAVE ACCOUNT SETTINGS
if($task == "dosave")
{
$user-&g开发者_如何学JAVAt;user_info['user_div'] = $_POST['user_div'];
// UPDATE DATABASE
$database->database_query("UPDATE se_users SET user_div='{$user->user_info['user_div']};
Error received: Parse error: syntax error, unexpected T_STRING in /home/bennyboy/public_html/user_profile_swap.php on line 26
Any help greatly appreciated.
Is this just at typo here, or is this your original code?
$database->database_query("UPDATE se_users SET user_div='{$user->user_info['user_div']};
should be:
$database->database_query("UPDATE se_users SET user_div='{$user->user_info['user_div']}");
I´m guessing you've left out part of the query, can you post it all?
And you need to make sure your value is safe to use in mysql using for example mysql_real_escape_string
.
Change this
$database->database_query("UPDATE se_users SET user_div='{$user->user_info['user_div']};
to this
$database->database_query('UPDATE se_users SET user_div='.$user->user_info['user_div'].'');
and try again.
精彩评论