daily pastebin goal
2%
SHARE
TWEET

Untitled

a guest Jan 25th, 2016 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. session_start();
  4. $verbindung = mysql_connect( "localhost", "******" , "*****" ); mysql_select_db( "m7_studios_de" );
  5. $username = $_POST["username"];
  6. $passwort = $_POST["password"];
  7. $ergebnis = mysql_query("SELECT * FROM accounts WHERE username = '$username' LIMIT 1");
  8. while($row = mysqli_fetch_object($ergebnis))
  9.     if($row->password == $passwort ){
  10.         $_SESSION["username"] = $username;
  11.         header( "Location: http://www.m7-studios.de/overview.php">
  12.         exit;
  13.     }
  14.     else{
  15.         header( "Location: http://www.m7-studios.de/">
  16.         exit;
  17.     }
  18.  
  19. ?>
  20.    
  21. <?php
  22.     $verbindung = mysql_connect( "localhost", "******" , "*****" );
  23.     mysql_select_db( "m7_studios_de" );
  24.     $username = $_POST["username"];
  25.     $passwort = $_POST["password"];
  26.     $abfrage = "SELECT username FROM accounts WHERE username='$username' AND password='$password' LIMIT 1";
  27.     $result = mysql_query($abfrage);
  28.     if(mysql_num_rows($result)==1) {
  29.         $_SESSION["username"] = $username;
  30.         header("Location: http://foo.com/logged_in.php");
  31.         die();
  32.     } else {
  33.         header("Location: http://foo.com/index?error=loginfailed");
  34.         die();
  35.     }
  36. ?>
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