I am brand new to Code Igniter but I can’t seem to find a way to do this in the documentation,
In normal PHP you can retrieve the contents of the entire POST variable like this
$_POST = $postedVars
But I can’t seem to find something that does this in the same manner, I’ve tried
$arr = $this->input->post;
and
$arr = $this->input->post();
With no luck! Is this possible in CI? Thanks in advance!
First, you need a form or something that sets the variables
Then, you retrieve them.
You are missing the name of the variable!
The signup form:
The Model:
Codeigniter stores sessions in cookies, it’s all weird.
I suggest just using PHP’s native sessions, such as $_SESSION[‘first_name’]. Make sure to write “session_start();” in your controller/model so you can use sessions!! (usually do it in the constructor)