<?php 
 
 $phone  = $_REQUEST['phone'];
 $password  = $_REQUEST['password'];
 
$host="localhost";
$user="freightmanagemen_android";
$passwords="do1@*YUL3D+.";
$db_name="freightmanagemen_ecom";

$conn=mysqli_connect($host,$user,$passwords,$db_name);

 

$sql = "SELECT * FROM user_panel WHERE phone='$phone' and password ='$password'";
 

 $r = mysqli_query($conn,$sql);
 
 $res = mysqli_fetch_array($r);
 
  $result = array();
 
 if(sizeof($res)>0){
	 
    array_push($result,array("error"=>"no","id"=>$res['id'],"name"=>$res['name'],"phone"=>$res['phone'],
								"address"=>$res['address'],"password"=>$res['password']));
 	 
 }else { 
	 array_push($result,array("error"=>"yes"));
 };
 
 echo json_encode(array("result"=>$result));
 
 
 mysqli_close($conn);
 
?>