SHARE
TWEET

Logg inn shit

a guest Jan 25th, 2016 25 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. session_start();
  3.  
  4. if(isset($_POST)&&!empty($_POST) {
  5.     $_username = "knut";
  6.     $_password = "123";
  7.    
  8.     $username = $_POST['username'];
  9.     $password = $_POST['password'];
  10.  
  11.     if($username == $_username && $password == $_password) {
  12.         $_SESSION["loggedin"] = "1";
  13.     }
  14. }
  15. if(!isset($_SESSION["loggedin"])) {
  16.     <form action="">
  17.         <input type="text" placeholder="Brukarnavn"></input>
  18.         <input type="password" placeholder="Passord"></input>
  19.         <input type="submit" value="Logg inn">
  20.     </form>
  21. } else {
  22.     <form action="LINK TIL SCRIPT">
  23.         <input type="submit" value="Koyr script">
  24.     </form>
  25. }
  26. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top