EllisLab text mark
Advanced Search
     
passing values of text box
Posted: 05 October 2010 01:10 AM   [ Ignore ]
Joined: 2010-10-05
17 posts

Hi,
  I am very new to codeigniter and i am creating a form ,can any one help me in passing values of input box (text box)in view to controller…....

 
Posted: 05 October 2010 01:47 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2008-11-18
678 posts

The path to your controller that you want to process the form should be in the action attribute of the form tag

<form action="[path to controller]">
...
</
form

In your controller, you want to use the Input Class to retrieve your form submitted data

$name $this->input->post('name');
or
$name $this->input->get('name');
//Depending on how you set your form up to send the data. 

If you want CodeIgniter to handle validating your form submitted data, take a look at the Form Validation Class.

 Signature 

Quality Coder | Looking for work? | Logo by InsiteFX