Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if ($_SERVER['REQUEST_METHOD'] != 'POST')
- {
- //display form here
- echo "<form name='usrinfo' action='session2.php' method='post'>";
- echo "Username: <input type='text' name='usrname'></br></input>";
- echo "FakePass: <input type='text' name='fakepass'></br></input>";
- echo "<input type='submit' value='Submit!' /></br></form>";
- session_start();
- $_SESSION['usr'] = $_POST['usrname'];
- $_SESSION['pass'] = $_POST['fakepass'];
- $_SESSION['time'] = time();
- echo "<a href='session2.php'>Page 2 </a>";
- }
- else
- {
- session_start();
- $sessionid = session_id();
- echo "Session ID: $sessionid ";
- echo "Username: $_SESSION['usr'] </br>";
- echo "FakePass: $_SESSION['pass'] </br>";
- echo "Time Started: $_SESSION['time'] </br>";
- }
- ?>
Add Comment
Please, Sign In to add comment