Problems with including php in shtml pages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

Problems with including php in shtml pages

Post by jaymoore_299 »

on one shtml page I have something like

Code: Select all

<!--#include file="1.php"-->
<a href="http://www.domain.com/2.php">test
</a></p>
<p> <a href="http://domain.com/2.php">test </a>
contents of 1.php is

Code: Select all

<?php
$url="sdifuudsf";
setcookie ("visitor_", "", time()-3600); 
setcookie ('visitor_', $url, time() + (60*60*24),"/",".domain.com");
?>
contents of 2.php is

Code: Select all

$referer_url = $_COOKIE['visitor_'];
print $referer_url;
When I load the shtml page, the cookies show up as empty when I follow the links. However when I just load 1.php then the cookies are set and I can check their values fine. Am I doing something wrong?
Post Reply