i am doing a login page.admin.php page deals with the html of the login page whereas the admin_log.php page deals with the validation.i.e.whether the data is present in the database or not.
admin.php
<body style="background-color:lightgrey;">
<?php
session_start();
?>
<h2>ADMIN LOGIN</h2>
<form action="admin_log.php" method="post">
Username: <input type="text" name="username" required="required">
<br><br>
Password: <input type="password" name="password" required="required">
<br><br>
<input type="submit" name="submit" value="Login">
</form>
admin_log.php
<?php
include('custdb1.php');
session_start();
$user=mysqli_real_escape_string($conn,$_POST['username']);
$pass=mysqli_real_escape_string($conn,$_POST['password']);
$fetch=$conn->query("SELECT * FROM `info` WHERE username='".$uname."' and password='".$pass."'");
$_SESSION['info_username']=$user;
header("Location:adm_prof.php");
?>
<body style="background-color:lightgrey;">