Welcome Guest, Not a member yet? Register   Sign In
Using post data in a second view
#1

[eluser]ozy123[/eluser]
Hellooo,

I have a process which passes through a chain as below:

controller-> view -> controller -> view -> controller -> database search using post data

In the first view I have a form which submits data. In the final controller using $this->input->post() I can't retrieve the data - should I save it to an array in the second controller and pass it along?

Ta!
#2

[eluser]pickupman[/eluser]
If you are needing to pass/save data for more than one page request, it is best to store it in a users session. Common example, someone uses a search. The form is posted to the controller, save the search in the users session, and load the search results. Using pagination to show more than one page of search results will require the server to know what the original search was for.




Theme © iAndrew 2016 - Forum software by © MyBB