Hi team,
I am just a beginner programmer on PHP and I was wondering if anybody can help me with this problem.
I am trying to set-up the PHP session variable but I wasnt able to print the said session variable in the next page. Here's an excerpt from the origin page. This was placed in the start of the PHP file:
<?php
session_start() ;
$_SESSION['session_var'] = "testing";
?>
Then I was trying to print out the session variable in the second PHP page but nothing displayed:
<?php
session_start() ;
$session_var = $_SESSION['session_var'];
echo "session_va r =".$session_var ;
?>
I am using PHP 5.2.2 and apache 2.2.4 in winXP. More FYI, I am running on Japanese OS (If this info can help). Thank you for all responses.
I am just a beginner programmer on PHP and I was wondering if anybody can help me with this problem.
I am trying to set-up the PHP session variable but I wasnt able to print the said session variable in the next page. Here's an excerpt from the origin page. This was placed in the start of the PHP file:
<?php
session_start() ;
$_SESSION['session_var'] = "testing";
?>
Then I was trying to print out the session variable in the second PHP page but nothing displayed:
<?php
session_start() ;
$session_var = $_SESSION['session_var'];
echo "session_va r =".$session_var ;
?>
I am using PHP 5.2.2 and apache 2.2.4 in winXP. More FYI, I am running on Japanese OS (If this info can help). Thank you for all responses.
Comment