Welcome Guest, Not a member yet? Register   Sign In
SIMPLE QUESTION: how to process form data from views in controller and send back to view
#1

[eluser]Unknown[/eluser]
So this looks like a really simple problem to solve: I have some data that is collected in a form in the view, and I'd like to pass it as parameters to a controller function and send the return value back to the view for display. I'm not sure how to go about doing this. Help!
#2

[eluser]NogDog[/eluser]
I'd suggest that you start by looking through the form_validation library tutorial and see if that gets you going in the right direction.
#3

[eluser]bretticus[/eluser]
form action is path to your controller and action (if you use form helper you can just use form_open('controller/path') ) Pass the post array to the other view ( $data['post'] = $_POST; ) via second view parameter. Access values for each $post array element with corresponding input name for key.
#4

[eluser]bretticus[/eluser]
All this time and I'm still double-posting you nogdog. Big Grin
#5

[eluser]NogDog[/eluser]
[quote author="bretticus" date="1240558020"]All this time and I'm still double-posting you nogdog. Big Grin[/quote]
:-P

Good to see you here. Smile




Theme © iAndrew 2016 - Forum software by © MyBB