$db = JFactory::getDbo();
$uri =JURI::getInstance();
$url= $uri->root();

$post = JRequest::get ('post');  
		
//$post['newpassword']='456789';
//$post['confpassword']='456789';
//$post['email']='vishal@harmistechnology.com';

$pass=md5($post['newpassword']);

$image_path=$url.'components/com_naderapp/assets/procedure_image/';
	
if($post['newpassword']==$post['confpassword'])
{
  $query='UPDATE #__users SET password="'.$pass.'" WHERE email="'.$post['email'].'"  ';
$db->setQuery($query); 
$parents=$db->loadObjectList();

 $arr = array('success' => '1','changepassword' =>'Password Changed Successfully');
   		 echo json_encode($arr);exit;

}

else
{
                $arr = array('success' => '0','changepassword' => 'Password Does not Match');
 		  echo json_encode($arr);exit;
}