<?php
include("../config/database.php");
$conct  = new connectionCreat();
$conct->connectToDB();
$conct->selectDB();
$mobile   = $_POST['mobile'];			     
$password = $_POST['password'];
$sql      = mysql_query("select * from `tbl_sh_driver` where `mobile`='".$mobile."' and `password`='".$password."'");
if(mysql_num_rows($sql)>0)
{
	$sqlData = mysql_fetch_array($sql); 															
	if($sqlData['status']==1)
	{
		$arr = array("status"=>true, "userId"=>$sqlData['id'], "name"=>$sqlData['name'], "designation"=>$sqlData['designation'], "msg"=>"Login Successfully.");
	}
	else
	{
		$arr = array('status'=>false, 'msg'=>"Your Registration Under Review. Contact To Service Provider.");			
	}
}
else
{
	$arr = array('status'=>false,'msg'=>"Please Enter Correct Details.");
}
echo json_encode($arr);		    	
mysql_close();		
?>

