View file mood.php
<?php include 'sys/db.php'; include 'sys/conf.php'; include 'sys/start.php'; include 'sys/functions.php'; if(isset($user['login'])){ $referer = $_SERVER['HTTP_REFERER']; if (isset($_POST['ank_mood']) && htmlspecialchars($_POST['ank_mood'])){ $user['ank_mood']=htmlspecialchars($_POST['ank_mood']); mysql_query("UPDATE `users` SET `ank_mood` = '$user[ank_mood]' WHERE `id` = '$user[id]' LIMIT 1"); header ("Location: $referer"); exit; } }else{ header ("Location: index.php"); exit;} ?>