Is it possible to... Create a cookie AND to use the header redirect command on one page? For example:
<?php
setcookie ("visited", "true", time(), "/"); /* Create Cookie! */
header("Location: index.php"); /* Redirect browser */
exit; /* Make sure that code below does not get executed when we redirect. */
?>
The reason why I ask is because I read in the FAQs that BOTH header redirects and Cookie functions have to be the first thing exectuted on a page.
So, if they can both be done, should the cookies function go first? Or can't they be done together like this?
Thanks.
-Rodney H.