Как обновить сессию
$_SESSION['site_color']
после запроса
header('Content-Type: text/html; charset=utf-8');
setlocale(LC_ALL,'ru_RU.65001','rus_RUS.65001','Russian_Russia.65001','russian');
session_start();
//База
include ('../connect/config.php');
if (isset($_POST['update_color'])){
$site_color = stripslashes($site_color);
$site_color = htmlspecialchars($site_color);
$id=$_SESSION['id'];
$site_color = $_POST['site_color'];
$sql = ("UPDATE users SET site_color='$site_color' WHERE id='$id'");
$query = mysql_query($sql);
if (!$query){
die('updating error'. mysql_error());
}
else { echo 1; }
}
session_start();
$_SESSION['site_color'] = $query['site_color'];
header('Location: /settings.php');