[RESOLVED] $_SESSION?
Posted: Sat Jun 21, 2008 2:00 pm
Question:
How come I cannot change $_Session variable using the following..
$country = "china";
PC Setting: (localhost)
1. apache_2.2.6-win32-x86
2. php-5.2.4-win32
3. mysql-essential-4.1.22
4. phpMyAdmin-2.11.6
Code:
How come I cannot change $_Session variable using the following..
$country = "china";
PC Setting: (localhost)
1. apache_2.2.6-win32-x86
2. php-5.2.4-win32
3. mysql-essential-4.1.22
4. phpMyAdmin-2.11.6
Code:
Code: Select all
===page1.php===
<?php
session_start();
$country = "usa";
session_register("country");
?>
===page2.php===
<?php
session_start();
echo $_SESSION['country']; //output 'usa'
[color=#FF0000]$country = "china";[/color]
echo $_SESSION['country']; //output 'usa'
?>