cookies and php - basics
From: deko (dje422_at_hotmail.com)
Date: 03/22/04
- Next message: deko: "Re: cookies and php - basics"
- Previous message: Tom Thackrey: "Re: Mysql Select problem"
- Next in thread: deko: "Re: cookies and php - basics"
- Reply: deko: "Re: cookies and php - basics"
- Reply: deko: "Re: cookies and php - basics"
- Reply: Alvaro G Vicario: "Re: cookies and php - basics"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 22 Mar 2004 07:02:23 GMT
This is about the simplest example I could come up with, but for some reason
(not my browser's settings) it's not working...
[top of page]
<?php
setcookie($cookie_name, "cookie_content", time()+3600);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>cookie test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<p>
<?php
if (isset($cookie_name))
{
print "Welcome! <br>";
}
else
{
print "Go away.";
}
?>
</p>
</body>
</html>
Am I missing something? thx
- Next message: deko: "Re: cookies and php - basics"
- Previous message: Tom Thackrey: "Re: Mysql Select problem"
- Next in thread: deko: "Re: cookies and php - basics"
- Reply: deko: "Re: cookies and php - basics"
- Reply: deko: "Re: cookies and php - basics"
- Reply: Alvaro G Vicario: "Re: cookies and php - basics"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|