Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $db = new PDO('sqlite:vehicledb.db');
- $username = ($_POST['username']);
- $password = ($_POST['password']);
- $selectquery = "select * from registration";
- $result = $db->query($selectquery);
- foreach($result as $row)
- {
- if ($row["Username"] == $username and $row["Password"] == $password){
- $_SESSION['logged_in'] = true;
- $_SESSION["username"] = $username;
- header('Location: personal_page.php');
- }
- }
- echo "<b><i>Incorrect details</i><b>";
- ?>
Add Comment
Please, Sign In to add comment