Welcome Guest, Not a member yet? Register   Sign In
Add a new function to add to request methods (POST, GET etc)
#1

Hi,
I'm not sure if the functionality for this already exists as I haven't been able to find any documentation for this in the CI docs. Basically we should be able to add to a GET or POST request vars manually using a method like
PHP Code:
$this->request->setPost('key' => 'value'); 

Currently if you need to add something to a request inside a controller, then you set it like so
PHP Code:
$_POST['key'] = 'value'
And then if you try to use
PHP Code:
$this-request->getPost(); 
the newly added key - value pair doesn't appear in that method.
Reply


Messages In This Thread
Add a new function to add to request methods (POST, GET etc) - by mrsyh - 07-06-2022, 06:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB