<?php
if(isset($_POST['submit'])){
include("db.php");
         
		$password = $_POST['password'];
		 
		$newpassword =md5($password);
		 
		$sql="SELECT * FROM admin WHERE   password='$newpassword'";
	    $res = $db->query($sql);
		$row=$res ->fetch_array();
		 
		$username=$row['username'];
		$password=$row['password'];
		 
       if(isset($username) and isset($password)){
			header("Location: index.php");
	   }
       else{
	     header("Location: extra_lock.php");
	   
	   }
	   


	}  
?>