I have this script to check that a cookie is on the computer, and then use the info from that cookie to take someone to the right page on my website. Here is the code
<?php
if (isset($_COOKIE["name"]))
$name = $_COOKIE["name"];
header("location: names/$name/$name.php");
else
echo "You have no name";
?>
When this script is run, it does nothing. Not even echo "You have no name". Any ideas why this code won't work?