For some reason this wont work.. Index is jsut returned blank ... Hmm Index.php : <?php include("http://www.website.com/cookie.php"); ?> PHP: Cookie.php: <?php if (isset($_COOKIE["background"])) $background = $_COOKIE['background']; else $background = " bgcolor='#FFFFFF'"; ?> PHP: It works perfectly if I just enter the code without using a include ...
You can't include remote files like that - as long as it can be accessed localy, the following code should work. <?php include("cookie.php"); ?> PHP: