<?php
require_once('../Db/dbconfig.php');
if($_POST['type'] == 'updatePassword')
 {
		$userid = $_POST['userid'];
		$opass = $_POST['opass'];
		$npass = $_POST['npass'];
		
		$querys = "update `user` set password = '".$npass."',updated_by=CURRENT_TIMESTAMP() where user_id = ".$userid." and password = '".$opass."'";
		$querysrun = mysqli_query($con, $querys);
		if($querysrun>0)
		{
			$myObj = [ 'status' => true];
		}else{
			$myObj = [ 'status' => false];
		}
		mysqli_close($con);
		header('Content-type: application/json');
		
		echo json_encode($myObj);
		
 }
 ?>