Stuff
public text v1 · immutable<?php
$someValue = "Hey look at this!";
if (isset($_COOKIE["theCookie"])) { // If the cookie is set
$theValue = $_COOKIE["theCookie"];
echo $theValue;
// Other actions
} else {
setcookie("theCookie", $someValue, time()+3600); // Set for one hour, change as needed
header("Location: http://www.trinity-ro.com/files/popup.htm"); // Make sure full address is set
exit; // Not that important
}
?>
<html>
Other stuff goes here, but remember if cookie isn't set it won't get output.