Jump to content

[SOLVED] Sessions


gwinz

Recommended Posts

Using PHP 5.2.2 and can't seem to get sessions to work...

<?php session_start();

echo session_id();

//newloginm.php

$morl=1;

$_SESSION['morl']='1';

$_SESSION['color']='red';

?>

________________

<?php session_start();

//Page2.php

 

$color = $_SESSION['color'];

echo "this Session is " . $color . "<BR>";

  echo "the User is M or L " . $_SESSION['morl'] . "<BR>";

echo session_id();

?>

 

I am getting the session id on both pages...but not the color or morl ???

Am I doing something wrong?

Thanks

GARY

 

Link to comment
https://forums.phpfreaks.com/topic/169667-solved-sessions/
Share on other sites

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.