load->library('session'); } function grid(){ //ISTRA // echo ''; $where['Id']=$_POST['id']; $this->db->select("*"); $this->db->from("userid"); $this->db->where($where); $q = $this->db->get(); // $q = $this->db->get(); $data = array(); if ($q->num_rows() > 0) { $data = $q->result(); } $datax = $this->db->count_all('userid'); $ttl = $datax; //====================================================================== $build_array = array ("success"=>true,"results"=>$ttl,"data"=>array()); foreach($data as $row) { $imageData = $row->Foto; } //header("content-type: image/jpg OR image/jpeg OR image/png"); echo $imageData; } } ?>