I have a php file which simply has to set a cookie and then forward the user to another page. The entire file currently consists of:
<?php
setcookie("cclang", "$lang");
header("Location: index.php");
?>
The user is forwarded but no cookie is set. If I remove the header part, ie.
<?php
setcookie("cclang", "$lang");
?>
the cookie is set. What am i doing wrong?
Thanks,
Jon.