Ok I'm hoping there's some skilled php coders here that can help me with this. I'm having a lot of trouble getting session variables to work even in its simplest form. Heres my code which tries to create session variable on one page and call it on another.
session1.php
<?php
// session1.php
session_start();
echo 'Welcome to page #1';
$_SESSION['color'] = 'green';
// Method 1, relying on cookies
echo '<br /><a href="session2.php">page 2</a>';
// Method 2, sending the session ID
echo '<br /><a href="session2.php?' . SID . '">session 2</a>';
?>
session2.php
<?php
// session2.php
session_start();
echo 'Welcome to page #2<br />';
echo $_SESSION['color']; // green
echo '<br /><a href="session1.php">page 1</a>';
?>