Thanx Rik. I tried adding the expire argument and it still doesn't set the cookie when I use the header. Is there another way to redirect?
this doesn't work:
setcookie ("var1", "dog",time()+36000, "", "", 0);
header( "Location: test2.php" );
this works:
setcookie ("var1", "dog",time()+36000, "", "", 0);
//header( "Location: test2.php" );