Retrieve data from database with POST data

β€œIt has become appallingly obvious that our technology has exceeded our humanity.” β€” Albert Einstein

I need code to get POST data and read value so that I get a query result from Database. Simple to get that code written I only need code to read Post data value in controller and fetch query from database so that i retrieve data from database to another controller. I put clean code to put forward what need may be done so that I get result from query string and put value from POST data to controller fetch query from database and return a query string data to same controller different function.

public function filterSectors()
{

$this->LoadModel(β€˜Sectors’);

       $Sectors = $this->Sectors->newEmptyEntity();
      echo 'outside post';
     if ($this->request->is('post')) {
           var_dump($_POST);
            $Sectors = $this->Sectors->patchEntity($Sectors, $this->request->getData());
            
            if ($this->Sectors->save($Sectors)) {
                
                $this->LoadModel('JobSeekers');
                
                $JobSeekers = $this->JobSeekers->find('all')->where(['sectors'=>$sectors['id']]);
                
                $this->Flash->success(__('The sector is a save.'));
                
                $this->set(compact('JobSeekers'));
                
                return $this->redirect(['controller'=>'Sectors', 'action' =>'applyPool']);
            }else{
                
                $this->Flash->error(__('The user could not be saved. Please, try again.'));
            }
            
        }
        
    }