Welcome Guest, Not a member yet? Register   Sign In
How do you prefer passing on ID from view to controller when editing data?
#1

[eluser]donald.tbd[/eluser]
So far i have used two ways to pass on ID from view to controller when editing a row.
1) On url row, for example form action = "news/edit/7", accessible in controller by $this->uri->segment(3).
2) Hidden field in form. For example <input type='hidden' name='id' value='7'>, accessible in controller by $this->input->post("id").

Witch one do you usually use? What are the pros/cons of each? Witch one is the the "right" or at least better way to do it.

Thank you! Smile


Messages In This Thread
How do you prefer passing on ID from view to controller when editing data? - by El Forum - 06-17-2011, 07:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB