Welcome Guest, Not a member yet? Register   Sign In
can i access post request data in the controller?

Maybe i am missing something in here.

is it only acessible in the views?
That's not so practical to handle forms.

I want to set the action of a post form to a controller, and then, according on the data provided, direct the user to the apropriate view.

it works in the controller also, infact I usually use it in the controllers.

so here are the steps

.you post to the controller from your view
.in the controller you retrieve the form vars using $this->input->post("var");

[eluser]Michael Wales[/eluser]
Agreed - I never even thought to use it in a view (or how that would be useful).

[eluser]CI Lee[/eluser]
However.... one could use that to implement a two click process to prevent spam. Display a second button to click before processing.


I have no idea what i missed yesterday, today i can fetch post values very easily.
I should have missed a character or something. Sorry.
Thank you all.

Theme © iAndrew 2016 - Forum software by © MyBB