<?php
session_start();
include("database.php");
if(isset($_POST['login']))
{
	$username = trim($_POST['username']);
	$password = trim($_POST['password']);
	$sqlUser  = mysqli_query($cn, "select `id` from tbl_employee where `mobile`='".$username."' and `password`='".$password."'")or die(mysql_error("login issue"));
	if(mysqli_num_rows($sqlUser)>0)
	{
		$sqlUserData = mysqli_fetch_array($sqlUser);
		$_SESSION['harsh_id'] = $sqlUserData['id'];
		header("location:../home.php");
	}
	else
	{
		$_SESSION['loginMSg'] = "Invaild Username and Password.";
		header("location:../login.php");
	}
}
?>