I am back with another small problem:
I want to create a session in which i want to declare a session variable. I want to use the value of that session variable on the next two pages. This is the code that i have.
1st page:
Expand|Select|Wrap|Line Numbers
- <?PHP
- session_start();
- session_register ("demo");
- if($_SERVER['HTTP_REFERER'] == "http://localhost/FAO_test/firms_WEB/Untitled-6.php")
- {
- $test=1;
- $_SESSION["demo"]= $test;
- }
- ?>
Expand|Select|Wrap|Line Numbers
- <?PHP
- session_start();
- if ($_SESSION['demo']== 1)
- include ("Untitled-7.php");
- ?>
Expand|Select|Wrap|Line Numbers
- <?PHP
- session_start();
- if ($_SESSION['demo']== 1)
- include ("Untitled-7.php");
- ?>
Please tell me what i am doing wrong??