Advertisement
Guest User

submit.php

a guest
Dec 20th, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.48 KB | None | 0 0
  1. <?php
  2.     session_start(); // Use on any page that uses $_SESSION.
  3.  
  4.     $username = $_POST["username"];
  5.     $password = $_POST["password"];
  6.  
  7.     $_SESSION["username"] = $username;
  8.     $_SESSION["password"] = $password; // Probably a bad idea. Don't do this.
  9.  
  10.     echo("Username: " . $username . " password: " . $password);
  11.     echo("Username: " . $_SESSION["username"] . " password: " . $_SESSION["password"]);
  12.  
  13.     session_destroy(); // Use this to clear the session data (log out).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement