Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="description" content="$1">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" type="text/css" href="style.css">
- <title>test</title>
- <?php
- include_once 'dbConfig.php';
- ini_set('display_errors', 1);
- ini_set('display_startup_errors', 1);
- error_reporting(E_ALL);
- ?>
- <h1 class="h1">Login</h1>
- </head>
- <?php
- if(isset($POST['login'])){
- $stmt = $mysqli->prepare("SELECT id FROM users WHERE username=? AND password=?");
- $stmt-> bind_param("ss", $username, $password);
- $username = $_POST["username"];
- $password = $_POST["password"];
- $stmt->execute();
- if($stmt->execute == true){
- header("Location: http://localhost/test2/Home.php");
- }
- }
- ?>
- <body>
- <form method="post" id="registerForm">
- <label id="first"> Username</label><br/>
- <input type="text" required name="username"><br/>
- <br/>
- <label id="first">Password</label><br/>
- <input type="password" required name="password"><br/>
- <br/>
- <input type="submit" value="Sign in" name="login"/>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement