<?php
	include('includes/php/dbconnection.php');
	$adminLogin = $_REQUEST['txt_name'];
	$adminPass = $_REQUEST['txt_password'];
	
	$loginQuery = "SELECT * FROM tbl_admin WHERE admin_username='".$adminLogin."' AND admin_password='".$adminPass."'";
	$loginResult = mysql_query($loginQuery)or die(mysql_error());
	$loginRowNum = mysql_num_rows($loginResult);
	if($loginRowNum > 0)
	{
		session_start();
		$log = $adminLogin;
		session_register('log');
		$_SESSION['log'] = $log;


		$mess ="Location: welcome.php";
		header($mess);
		exit;
	}
	else
	{
		header('Location: index.php?id="true"');
		exit;
	}
?>