<?php
setcookie("dede","1");
if(!empty($HTTP_COOKIE_VARS["dede"]))
print("i saw the cookie");
else
print("i did not see any cookie");
?>
when i first run this it gives the mesage "i did not see any cookie" but after refreshing the pag it gives the message "i saw the cookie". how can i see a cookie without refreshing the page???