Advertisement
Guest User

Untitled

a guest
May 24th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <meta name="description" content="$1">
  7. <meta name="viewport" content="width=device-width, initial-scale=1">
  8.  
  9. <link rel="stylesheet" type="text/css" href="style.css">
  10.  
  11. <title>test</title>
  12.  
  13. <?php
  14. include_once 'dbConfig.php';
  15. ini_set('display_errors', 1);
  16. ini_set('display_startup_errors', 1);
  17. error_reporting(E_ALL);
  18. ?>
  19.  
  20. <h1 class="h1">Login</h1>
  21. </head>
  22.  
  23. <?php
  24. if(isset($POST['login'])){
  25.  
  26. $stmt = $mysqli->prepare("SELECT id FROM users WHERE username=? AND password=?");
  27. $stmt-> bind_param("ss", $username, $password);
  28.  
  29. $username = $_POST["username"];
  30. $password = $_POST["password"];
  31.  
  32. $stmt->execute();
  33. if($stmt->execute == true){
  34. header("Location: http://localhost/test2/Home.php");
  35. }
  36.  
  37. }
  38. ?>
  39.  
  40. <body>
  41.  
  42. <form method="post" id="registerForm">
  43. <label id="first"> Username</label><br/>
  44. <input type="text" required name="username"><br/>
  45. <br/>
  46. <label id="first">Password</label><br/>
  47. <input type="password" required name="password"><br/>
  48. <br/>
  49. <input type="submit" value="Sign in" name="login"/>
  50.  
  51. </body>
  52. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement