Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("../libs/connect.php");
- $name = $_POST['name'];
- $password = $_POST['password'];
- $tb = $con->prepare("select id, name, password from admin where name=:name and password=:password");
- $tb->bindParam(":name", $name, PDO::PARAM_STR);
- $tb->bindParam(":password", $password, PDO::PARAM_STR);
- $tb->execute();
- $l = $tb->fetch(PDO::FETCH_ASSOC);
- if (!empty($l)) {
- $_SESSION["usuario"] = $name;
- header("Location: admin.php" . $l["usuario"]);
- } else {
- echo "Nome de Ususário ou Senha Incorretos !";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement