hi everyone,
my problem is simple but yet I cannot seem to find the answer, anyone got any ideas?
I have to set a cookie after using a require statement. My code is as follows and I have ensured that there is no whitespace but it still doesn't seem to work.
include.php3 file:
<?
$database = "*";
$username = "";
$password = "***";
$path = "/usr/local/mysql/bin/";
$conn = mysql_connect("localhost", $username, $password);
mysql_select_db($database, $conn); ?>
page that is trying to set the cookie:
<? require "../../include/include.php3" ?>
<? setcookie("guest_cookie", "value"); ?>
error message generated:
<br>
<b>Warning</b>: Oops, php3_SetCookie called after header has been sent
in <b>/webspace/***.com/www/splash/.php3</b> on line <b>2</b><br>