Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $thisfile = basename(__FILE__);
- session_start();
- if (isset($_POST['test'])) {
- $_SESSION['test']="set";
- header('Location:'.$thisfile.'');
- }
- echo "<form method='post' action=''>
- <input type='submit' name='teszt' value='set post'>";
- //I want to display (var dump) the session variable after the redirect, then destroy it. but it is not working
- if (isset($_SESSION['test'])) {
- var_dump($_SESSION);
- unset($_SESSION['test']);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement