hello ,
in page one i creates session variable and register one variable as session variable assigning a value, for example "abcd"
in next page due to some reasons i could not reterive the value stored in session variable ,but iam getting the sessionId when i pass
print "$PHPSESSID,in next page
so my questions is that is it possible to read and display the value stored in sessionId, if possible how to do that ,
[/b]
printing value in phpsessID
Moderator: General Moderators
-
daemorhedron
- Forum Commoner
- Posts: 52
- Joined: Tue Jul 23, 2002 11:03 am
In first page :
In second page :
Code: Select all
<?php
session_start();
$variable = 'abcd';
session_register('variable');
?>Code: Select all
<?php
session_start();
echo 'Your session ID is: '.session_id().'<br />';
// if you have register_globals set on
echo 'The value of variable is: '.$variable.'<br />';
// if you don't have register_globals set on
echo 'The value of variable is: '.$HTTP_SESSION_VARSїvariable].'<br />';
// or
echo 'The value of variable is: '.$_SESSIONїvariable].'<br />';
?>