Guest User

Untitled

a guest
Jun 29th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4.  
  5. $verbindung = mysql_connect("localhost","root","test12345")or die ("MYSQL-Password falsch!");
  6. mysql_select_db(login, $verbindung)or die ("Deine Datenbank existiert nicht!");
  7.  
  8. $username = mysql_real_escape_string($_POST['username']);
  9.  
  10. $password = mysql_real_escape_string($_POST['password']);
  11.  
  12. $query = mysql_query("SELECT * FROM users WHERE username = '".$username."' && password = '".$password."'");
  13.  
  14. $row = mysql_fetch_assoc($query);
  15.  
  16.  
  17.  
  18. ?>
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27. <html>
  28. <head>
  29. <title>Einloggen!</title>
  30.  
  31. <div style="width: 100%; background-color: red; color: white; font-size: 24px;margin-top:-10px;margin-left:-10px;"><center><?php echo $login_error; ?></center></div>
  32.  
  33. <style type="text/css">
  34.  
  35.  
  36. body {
  37.  
  38. font-size:18px;
  39. font-familiy:century gothic;
  40. font-weight:small-caps;
  41. background-color:greey;
  42. text-align:center;
  43. }
  44.  
  45. #button {
  46.  
  47. margin-top:10px;
  48. font-size:18px;
  49. }
  50.  
  51.  
  52. </style>
  53.  
  54.  
  55. <form action="index.php" method="post">
  56.  
  57.  
  58. Benutzername:<br /><input type="text" name="username">
  59. <br />
  60. Password:<br /><input type="password" name="password">
  61. <br />
  62. <input type="submit" name="einloggen" value="Einloggen" style="width: 8%;margin-top:10px;border-radius:10px;font-size:18px;font-familiy:century gothic;"></center>
  63. <br />
  64.  
  65.  
  66. </html>
  67. </head>
  68. </form>
Add Comment
Please, Sign In to add comment