<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        body {
            background-color: plum;
        }
        h1 {
            font-size: 60px;
            text-align: center;
            margin-top:60px;
            font-family: tahoma;
            text-transform: uppercase;
        }
         a {
            font-size: 20px;
            text-align: center;
            margin-top:30px;
            font-family: tahoma;
            color: rgb(4, 4, 195);
            text-decoration: none;
            font-weight: bold;
            cursor:pointer;
            margin-left: 200px;
         }
         a:hover {
            color: rgb(1, 1, 108);
         }
    </style>
</head>
<body>
            
  
    </body>
</html>
<?php

$user2 = $_POST["user2"];
$pass2 = $_POST["pass2"];

$con = mysqli_connect("localhost", "root", "", "project");

$query = "select * from `user_data` where Username = '$user2' and Password = '$pass2'";
$res = mysqli_query($con, $query);
if(mysqli_num_rows($res) == 1) {
    header("location: dashboard.html");
/*
echo "<a href='login.php'> Log Out</a>";
echo "<h1>Welcome ". $user2. "</h1>";*/
} else {    
    ?>
    <script>
        alert("Username/Password Incorrect")
    </script>
   <script>
location.replace('login.php')
 </script>

    <?php
       
 
}
?>