<html>
<body>
<?php
//===================================================================================
// Redirect to another page if "cust_id" cookie does not exist
//===================================================================================
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
$cust_id = $_COOKIE['cust_id'];
if ($cust_id) //if there is a cookie for customer
header("Location: redirect2.php"); //redirect to another page
print "<h1>Page 1 (Starting Page)</h1>";
print "<h2>Welcome new customer</h2>";
print "<p><b>You do not have a 'cust_id' cookie</b>";
print "<p><b>Create a 'cust_id' cookie using 'cookie.html'</b>";
?>
<?php include "../include.php"; ?> <!-- hyperlink to see the code -->
</body>
</html>