Cookie Problems (Different than the post by David Jackson)
| From: | Brian J. Celenza | Date: | Tue, 02 Mar 2004 17:45:24 +0000 |
| Subject: | Cookie Problems (Different than the post by David Jackson) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-179279@lists.php.net to get a copy of this message | ||
Here's a snippet of the code. I'm sending the setcookie header out long
before any of the other headers, but I'm still getting:
Warning: Cannot modify header information - headers already sent by (output
started at C:\wwwroot\index.php:4) in C:\wwwroot\index.php on line 7
-----Code------
<?
function cookie_set($userid){
if (isset($userid)){
setcookie("vfsnet", $userid, time()+600);
}
}
cookie_set($_GET['user']);
?>
<html>
<head>
<?
include('lib/sessionfunc.php');
include('lib/dbconnect.php');
include('lib/filefunc.php');
include('lib/urlfunc.php');
?>
<link rel="stylesheet" type="text/css" href="themes/master.css">
<title>Website0001</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
---Code---
Any ideas?
Thanks
Brian