Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- include("dbcon.php");
- error_reporting(E_ALL & ~E_NOTICE);
- $username = $_POST["username"];
- $password = md5($_POST["password"]);
- $abfrage = mysqli_query($db, "SELECT * FROM login WHERE username LIKE => = '$username' LIMIT 1");
- $row = mysqli_fetch_object($abfrage);
- $_SESSION['username'] = $username;
- if($row->password == $password && $row->rechte == "admin")
- {
- header("Location: index.php");
- }
- elseif ($row->password == $password && $row->rechte != "admin")
- {
- header("Location: index.php");
- }
- else
- {
- header("Location: login.html");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement