<?php
session_start();
error_reporting(0);
ob_start(0);
	include "include/db-connect.php";
	
	
  $randum_number=$_REQUEST['captcha_code'];

 $_SESSION['randum_number'];
	
if($_SESSION['randum_number']!= $randum_number){  
		 
		 
		 header("location:amr_Logon.php?cap=inval");
		 		
	}else{	
	
     	 $uname=$_REQUEST['uname'];
		 $upass=$_REQUEST['upass'];
          $customer=$_REQUEST['type'];
		  
	$sql		=	mysql_query("select COUNT(*) as num from admin where Binary `adm_name`='$uname' and Binary `adm_pass`='$upass'");

	 $result		=	mysql_fetch_array($sql); 
 $count=$result[num];

	if($count >= 1)

	{
		
		$_SESSION['UN']=$uname;
		header("Location:dashboard.php");
	}
	else 
	{
		header("Location:amr_Logon.php?param=err");
	}
	
	
	}
?>