I have this query on my CMS but it doesn't work. I try to update the member's profile...
<?php
// INCLUDE FILES
include('config.cms.php');
include('php/connect_db.php');
// PREPARE STRINGS
$user_id = $_POST['user_id'];
$full_name = mysql_real_escape_string($_POST['full_name']);
$email = mysql_real_escape_string($_POST['email']);
if (isset($_POST['avatar']))
{
$avatar = mysql_real_escape_string($_POST['avatar']);
}
else
{
$avatar = '';
}
$avatar_type = $_POST['avatar_type'];
$slogan = mysql_real_escape_string($_POST['slogan']);
$privacy = $_POST['privacy'];
$location = mysql_real_escape_string($_POST['location']);
$bio = mysql_real_escape_string($_POST['bio']);
// QUERY THE DB
mysql_query("UPDATE users SET `full_name`='".$full_name."', `email`='".$email."', `avatar`='".$avatar."', `avatar_type`='".$avatar_type."', `user_slogan`='".$slogan."', `privacy`='".$privacy."', `location`='".$location."', `bio`='".$bio."' WHERE `id`='".$user_id."'");
// GET ERROR IF EXIST
mysql_error();
// REDIRECT AFTER COMPLETED
header('Location: profile.php?saved');
?>
Is there any error because I can't find anything!