Advertisement
Guest User

login

a guest
Feb 5th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Tek13login</title>
  4. </head>
  5. <body>
  6. <form action = "tek13login.php" method = "post">
  7. Username :<input type="text" = name = "username">
  8. Password :<input type="password" = name = "password">
  9. <br>
  10. <input type = "submit" value = "login">
  11. </form>
  12. <?php
  13. $conn = mysql_connect('localhost', 'root', '') or die(my_sql_error);
  14. $databas = mysql_select_db('tek13login', $conn);
  15. echo "Connect tek13login är okej.";
  16. $users = mysql_query("SELECT * FROM userinfo");
  17. while($row = mysql_fetch_array($users)){
  18.  
  19. if(($row["username"] == $_POST["username"]) && ($row["password"] == $_POST["password"]))
  20. echo "<br> Välkommen";
  21.  
  22. }
  23.  
  24. ?>
  25.  
  26. </body>
  27. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement