
June 15th, 2000, 02:54 PM
|
|
Junior Member
|
|
Join Date: Feb 2000
Location: NY, NY,USA
Posts: 18
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
I am not having any trouble setting a cookie, but am having trouble reading the cookie from another page. Could someone tell me what I'm doing wrong here? The first page sets the cookie the second page is supposed to read the cookie and say that it worked.
Thanks
--------------------------
index.php3 follows:
<?php
setcookie("flashtest","1");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<?php print $flashtest; ?>
<a href="second.php3">Next</a>
</body>
</html>
second.php3 follows:
<?php
if (isset($testcookie)){
?>
<HTML>
<HEAD><TITLE>It worked</TITLE>
</HEAD>
<BODY>
<H1>It worked</H1>
<?php
print $testcookie;
}
else { ?>
<HTML>
<HEAD>
<TITLE>It didn't work</TITLE>
</HEAD>
<BODY>
<H1>It didn't work</H1>
<?php print $testcookie; } ?>
</BODY>
</HTML>
|