Balazs,
Have you declared the variable $user anywhere?
setcookie("forum_user", $user, time()+1800);
Try it with a hard coded value instead of user and see if that works. If so then you are not setting $user properly.
eg.
setcookie("forum_user", "MIKE" , time()+1800);
$my_cookie = $HTTP_COOKIE_VARS["forum_user"];
echo $my_cookie;
Should output MIKE
Regards
Mike
www.digitalegg.net