Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if($_SERVER["REQUEST_METHOD"] == "POST")
- {
- require_once 'config.php';
- $sql="select * from users where username=:username";
- $stmt= $pdo->prepare($sql);
- $stmt=bineParam(':username',$username,PDO::PARAM_STR);
- $stmt=execute();
- if($stmt->rowCount() == 1)
- {
- $row= $stmt->fetch();
- $hasspassword=$row['password'];
- if($password == $hashpassword)
- {
- session_start();
- $_SESSION['username']= $username;
- header('Location:mytable.php');
- }
- else
- header('Location:login.php');
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement