Posted: Sun Feb 21, 1999 12:08 pm Post subject: RE: Problem with Cookies
The cookie stuff should be placed BEFORE your HTML code. Something like:
<?PHP
$value="Alex firts cookie";
SetCookie("TestCookie",$value,time()+3600); /* expire in 1 hour */
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>
etc etc.
The cookie can be read via the netx code:
(just put the code somewhere in the <body> part)
<?PHP
echo "Your cookie value is: ";
echo $TestCookie;
?>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum