> 
> **Possible Duplicate:**  
> 
> [“Header Already Sent” error in PHP](https://stackoverflow.com/questions/8028957/header-already-sent-error-in-php) 
> 
> 
> 

I have my code so that the user specifies their IGN (Ingame Name) And then stores it in a cookie. It will not work though.

```
<form action="index.php" method="GET">
    Minecraft IGN:
    <input type="text" name="ign">
    <input type="submit" value="Submit">
</form>

<?PHP
error_reporting(0);
$player = $_GET["ign"];
$exp = time()+86400;
setcookie("ign", $player, $exp, "/", "", "");

if (isset($player)) {
    echo "Your Minecraft Ingame Name Was Set To $player!";
}
?>

<br>

<?PHP
if (isset($player)) {
    echo '<p>Click <a href="http://gophobia.com/phpsend/">Here</a> To Redeem Ur Prizes    :3</p>';
}
echo '<br />';
print_r($_COOKIE);
?>

```