Jump to content

[SOLVED] Hopefully a simple Session question


sardonicgem

Recommended Posts

Hey guys,  I have a login page that stores the username in the SESSION array. My problem is that after I direct the user to another page (board.php), my SESSION array loses all it's values.

 

I start the session in the beginning of login.php

 

<?php

session_start();

.

.

.

//validate session

$_SESSION['logged'] = true;

$_SESSION['username'] = $in_name;

.

.

?>

 

After the user logs in, he is directed to board.php

 

<?php

 

require_once("messageboard_functions.php");

 

echo "<html>";

do_html_header("Message Board");

echo "<body>";

do_html_heading("Message Board");

 

echo $_SESSION['username'];

 

echo "</body></html>";

?>

 

 

Any ideas why my $_SESSION['username'] comes out empty??

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.