I'm trying to set the cookie, but it is not being set.

```
$hp = explode('=', $hp);
$shp = $hp[0];

echo $hp_id=$hp[1];

if(empty($_cookie['betahomepage1'])) {
    setcookie('betahomepage1',$hp_id,$expire,"/");
    echo "cookie not set";   
} else {
    echo "cookie is set";   
}

```