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


	$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 userpassword='$par2'";
	$re1 = mysqli_query($conn,$eve1);
																	
		if(mysqli_num_rows($re1) > 0)
	{
		//$result="1";
		$evenewpass = "update res_user_master set userpassword='$par3' where userloginid='$par1'";
		$renewpass = mysqli_query($conn, $evenewpass);
		$result="1";
		$msg = "Success";
		
		$newResponse[] = array('p1'=> $result,'p2'=> $msg);
	$posts = ["item" => $newResponse];
		$response['posts'] = $posts;
		echo stripslashes(json_encode( $posts));

	}
   else
   {
		$result="0";
		$msg="Failure";
		
		$newResponse[] = array('p1'=> $result,'p2'=> $msg);
	$posts = ["item" => $newResponse];
		$response['posts'] = $posts;
		echo stripslashes(json_encode( $posts));
   }
	mysqli_close($conn);
?>
