Thanks for your reply. To be more clear, my question is to:
1. When the user click "page2.php?inc=true" on "page1.htm", the broswer will go to "page2.php" and display "$inc is TRUE!".
2. If the user click "Back/Next" buttons, the "page2.php" won't display "$inc is TRUE!", but show "$inc is FALSE!".
3. When the user go to "page1.htm" and click "page2.php?inc=true" again, "$inc is TRUE!" will be shown on "page2.php" again.
I tried to add the following codes:
page1 (of course, I changed the file type from HTM to PHP):
session_start();
if (!session_is_registered("is_shown")) {
session_register("is_shown");
}
$is_shown = false;
page2:
session_start();
if (!session_is_registered("is_shown")) {
session_register("is_shown");
$is_shown = false;
}
and modify the code as:
if ($is_shown)
$inc = false;
if ($inc) {
echo "<h1>\$inc is TRUE!</h1>";
$is_shown = true;
} else {
echo "<h1>\$inc is FALSE!</h1>";
}
But the problem is still existed. I don't know why this doesn't work. Please help!
Many thanks,
Gahook Dinn