<?php
error_reporting(0);
session_start();
include ('dbcon.php');
$password=$_POST['pasword'];
$query="select * from login where username='$username'";
$r=mysqli_query($con,$query);
$row=mysqli_fetch_row($query);
if($password==$row['password'])
{
?>
<script type="text/javascript">
 		window.location="dashboard.php";
 	</script>
    <?php
	}
	else if($password!=$row['password'])
	{
	?>
	<script type="text/javascript">
		alert("Invalid Login");
		window.location="index.php";
	</script>
	<?php
}
?>

