Page 1 of 1

problem with sessions

PostPosted: 30. November 2008 05:54
by VEINTYUNICO
i got this lines to start a session in my web, the rest of the pages must check that the session is started.

session_start();
$_SESSION["user"] = $file["ClientId"];
$_SESSION["logged"] = TRUE;

in the other pages, y wrote this to check if the session is started
but nothing happend, it doesn't show the messages.

if ($_SESSION["logged"])
echo "SESSION STARTED";


but if i write this
if (!$_SESSION["logged"] )
echo "NO SESSION SARTED";

it shows the message, there is something that i must change in php.ini?
I'm using XAMPP on windows XP SP3

PostPosted: 30. November 2008 10:44
by Wiedmann
You must have "session_start()" in every file.

PostPosted: 30. November 2008 15:25
by VEINTYUNICO
ahhh jajajaj..yes you're right! what i was thinking! jajajaja.
I'm sorry...it was 4 am...i don't think in that hours