File "action.php"

Full Path: /home/krishnamexports/public_html/panel/action/action.php
File size: 721 bytes
MIME-type: text/x-php; charset=us-ascii
Charset: utf-8

<?php

session_start();

include("../../config/database.php");

if(isset($_POST['login']))

{

	$username = trim($_POST['username']);

	$password = encryptIt($_POST['password']);

	$sqlUser  = mysqli_query($cn, "select `id` from tbl_employee where `mobile`='".$username."' and `password`='".$password."' and `status`=1 and `designation_id` NOT IN(2,3,4)");

	if(mysqli_num_rows($sqlUser)>0)

	{

		$sqlUserData = mysqli_fetch_array($sqlUser);

		$_SESSION['krishnamExportsId'] = $sqlUserData['id'];

		$_SESSION['designation_id'] = $sqlUserData['designation_id'];

		header("location:../home.php");

	}

	else

	{

		$_SESSION['loginMSg'] = "Invaild Username and Password.";

		header("location:../login.php");

	}

}

?>