Advertisement
Blasium

Untitled

Mar 9th, 2012
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2. //denk hier an den mysql-connect und die security.php aus physik ;)
  3.  
  4. if(isset($_POST['submit']))
  5. {
  6.     $cmd = 'SELECT * FROM logintabelle WHERE benutzername="'.$_POST['usr'].'" AND password="'.$_POST['pw'].'"';
  7.     $query = mysql_query($cmd);
  8.     if(mysql_num_rows($query)==0) die("Login falsch");
  9.     else die("Login richtig");
  10. }
  11. else
  12. {
  13.     echo '<form action="" method="post">
  14. <input type="text" name="usr" placeholder="Benutzername">
  15. <input type="password" name="pw" placeholder="passwort">
  16. <input type="submit" name="submit" value="Einloggen">';
  17. }
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement