Is it possible to get all post variables in ExpressionEngine, like you could in CodeIgniter? Is it possible to get all post variables in ExpressionEngine, like you could in CodeIgniter? codeigniter codeigniter

Is it possible to get all post variables in ExpressionEngine, like you could in CodeIgniter?


Try native

$this->input->post(NULL, TRUE); // returns all POST items with XSS filter $this->input->post(); // returns all POST items without XSS filter

Ref: https://www.codeigniter.com/user_guide/libraries/input.html


Ok, the way to get results similar to CI within EE for all elements of a POST, while still leveraging the security features of EE is the following:

foreach($_POST as $key => $value){     $data[$key] = $this->EE->input->post($key);}

Since you can access POST vars by name, looping through them in $_POST, then explicitly calling each will yield the desired result.