Forum Moderators: coopster
index.php
<?php
session_start();
session_id("555");
if (!isset($_SESSION['style']) )
{
$_SESSION['style'] = "red";
}
if ( isset($_GET['style']) )
{
$_SESSION['style'] = $_GET['style'];
}
?>
<html>
<head>
<title>Testing</title>
</head>
<body bgcolor="<?=$_SESSION['style'];?>">
Current color: <?=$_SESSION['style'];?>
<br />
<a href="index.php?style=red">Red</a>
<a href="index.php?style=green">Green</a>
<a href="style.php">Style</a>
</body>
</html>
then we move to another page
style.php
<?php session_id("555");?>
<html>
<head>
<title>Project Random :: Carrots or Cabbage</title>
</head>
<body bgcolor="<? echo ( $_SESSION['style'] );?>">
You selected <? echo ( $_SESSION['style'] );?>
<p>
</p>
</body>
</html>
style.php is just blank and doesnt output the variables set by the index... does anyone have any ideas