<?php  
error_reporting(E_ERROR | E_PARSE);
	include("../connect.php");
	$par1=$_GET['mobile'];
	$par2=$_GET['password'];
	$par3=$_GET['tmid'];
	$par4=$_GET['tareweight'];
	

	$response = array();
	$posts = array();
	
	
	date_default_timezone_set("Asia/Singapore");
	$mdate= date('Y-m-d H:i:s');
	$myObj2 = new stdClass();
    $eve1 = "SELECT * FROM res_user_master where  userloginid='$par1' and usersecurepasword='$par2' and userstatus='Active' and userdesignation='User' limit 0,1";
	$re1 = mysqli_query($conn,$eve1);
																	
	if(mysqli_num_rows($re1) > 0)
	{
		//$result="1";
		$userid=0;
		 while($rt1 = mysqli_fetch_assoc($re1))
		 {
			 $userid=$rt1['usermid'];
		 }
		
		 $query1 = "update res_trolley_master set trolleytareweight='$par4',trolleyupdatedon='$mdate',trolleyupdatedby='$userid'  where trolleymid=$par3";
		$stmt1=mysqli_query($conn,$query1);
			
		$result="1";
		$msg = "Success";
		
		$posts[] = array('result'=> $result,'msg'=> $msg);
		echo stripslashes(json_encode( array('item' => $posts)));

	}
   else
   {
		$result="0";
		$msg="Failure";
		
		$posts[] = array('result'=> $result,'msg'=> $msg);
		echo stripslashes(json_encode( array('item' => $posts)));

   }
	mysqli_close($conn);
?>
