For some reason this code does not set a cookie on my site, but the code afterwards is being executed :/
<?php
if (!isset($_COOKIE["drop"])){
setcookie("drop",true);
//do code for one time until cookies are deleted
}
?>
Edit: Just tested it on my laptop running lamp, it works perfectly. Can there be a php setting on my webhosting that's wrong?