Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--loggin.php-->
- <?php
- error_reporting(-1); // Report all type of errors
- ini_set('display_errors', 1); // Display all errors
- ini_set('output_buffering', 0); // Do not buffer outputs, write directly
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>Loggin</title>
- </head>
- <body>
- <?php
- include('databaseConnection.php');
- if (isset($_POST['send']))
- {
- $username = $_POST["username"];
- $password = $_POST["password"];
- $sql = "SELECT * FROM users WHERE userName = '$username' ";
- $stmt = $dbConn->prepare($sql);
- $data = array();
- $stmt->execute($data);
- $res = $stmt->fetch(PDO::FETCH_ASSOC);
- $output = htmlentities(print_r($res, 1));
- echo "<pre>$output</pre>";
- }
- ?>
- <form method ="POST" action ="">
- <input type="text" name="username">
- <input type="password" name="password">
- <input type="submit" name="send">
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement