Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php include "includes/db.php"; ?>
- <?php session_start(); ?>
- <?php
- if(isset($_POST['submit'])) {
- global $connection;
- echo $username = $_POST['username'];
- echo $password = $_POST['password'];
- $query = "SELECT * FROM users WHERE username = '$username', password = '$password'";
- $result = mysqli_query($connection, $query);
- $row = mysqli_fetch_assoc($result);
- $_SESSION['userid'] = $row['userid'];
- $_SESSION['username'] = $row['username'];
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>The Akashic Vault</title>
- <link rel="stylesheet" href="styles/mainstyle.css" class="css">
- </head>
- <body>
- <div class="headerContent">
- <div class="topmenu">
- <img src="images/logo.png" alt="" style="margin: 6px;">
- <form action="index.php" method="post">
- <input type="text" name="username" class="topinput" value="Username">
- <input type="password" name="password" class="topinput" value="Password">
- <input type="submit" class="inputbtn" name"submit" value="Login">
- </form>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement