iGuest 3 Report post Posted December 31, 2004 Hi, i've probs in setting cookies n sessions. When i set them on one pg, it somehow doesn't appear on other pgs i.e. e variables r empty. But thr doesn't seem to b anything wrong wif e code cos previously, it was working on another host. Can any1 pls help me? Thank you!TESTCOOKIE1.php<?phpif(!session_start())session_start();$name="he";setcookie("uname", $name, time()+36000);setcookie("PHPSESSID",session_id(),time()+3600);session_register ("test_S");$HTTP_SESSION_VARS ["test_S"] = "testvalue";?> <html><body><a href="http://forums.xisto.com/no_longer_exists/ pg</a></body></html>TESTCOOKIE2.PHP<?phpif(!session_start())session_start();echo ("$test_S");if (isset($_COOKIE["uname"]))echo "Welcome " . $_COOKIE["uname"] . "!<br />";elseecho "You are not logged in!<br />";if (isset($_COOKIE["PHPSESSID"]))echo "Welcome " . $_COOKIE["PHPSESSID"] . "!<br />";elseecho "You are not logged in!<br />";?><html><body></body></html> Share this post Link to post Share on other sites