<?php
if(isset($_POST['state'])){
      require_once('../../assets/config/config.php');
      $obj=new Database();
      $b=[];   
      if($_POST['state']=='usr')
      {
         $obj->select('user','*',null,null,null,null);
         $result=$obj->getResult();                              
         foreach($result as $row)
         {   
            array_push($b,$row);                
         }
         header('Content-type:application/json');
         echo json_encode($b);
      }
   }
?>