Trouble with PHP and Cookie set as Variable

vonC

New Member
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\[code\]<?php if (isset($_COOKIE["name"])) $name = $_COOKIE["name"]; header("location: names/$name/$name.php"); else echo "You have no name"; ?>\[/code\]When this script is run, it does nothing. Not even echo "You have no name". Any ideas why this code won't work?
 
Back
Top