Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if($submit)
- {
- $first=$_POST['first'];
- $password=$_POST['password'];
- $hash="*85955899FF0A8CDC2CC36745267ABA38EAD1D28"; //this is the hashed password i got by using function PASSWORD in database
- $password=password_verify($password,$hash);
- $db = new mysqli("localhost", "root","","learndb");
- $sql = "select * from admin where username = '" . $first . "' and password = '". $password . "'";
- $result = $db->query($sql);
- $result=mysqli_num_rows($result);
- if($result>0)
- {
- session_start();
- $_SESSION['logged_in'] = true;
- session_regenerate_id(true);
- header("Location:loginhome.php");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement