Also, you don't need the " " around the variable:
setcookie("user", "$_POST[user]", time()+60*60*24*360, "/rball/", "www.test.com") or die("Could not set cookie");
Do this:
setcookie("user", $_POST['user'], time()+60*60*24*360, "/rball/", 'test.com') or die("Could not set cookie");