Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ===INDEX PAGE===
- <?php
- session_start();
- $no_phpBB = true;
- $pagetitle = "test";
- require_once("../includes/head.inc");
- if(isset($_GET['sessVar'])) {
- $_SESSION['sessVar'] = $_GET['sessVar'];
- echo "Session saved as".$_SESSION['sessVar'].". Now goto <a href=\"page2.php\">Page 2</a>";
- }
- echo "<br /><br /><form method=\"get\" action=\"index.php\"> <br /><br />
- Variable: <input type=\"text\" name=\"sessVar\" /><input type=\"submit\" value=\"Save variable\" />";
- require_once("../includes/foot.inc");
- ?>
- ===PAGE 2===
- <?php
- session_start();
- $no_phpBB = true;
- require_once("../includes/head.inc");
- echo "The variable is: <b>".$_SESSION['sesVar']."</b>";
- require_once("../includes/foot.inc");
- ?>
Add Comment
Please, Sign In to add comment