[eluser]johnmiller[/eluser]
this is my textbox
Code:
<input type="text" id="txt_fname" name="txt_fname" />
this is my button
Code:
<?php
$this->load->helper('form');
echo form_open('blog/do_search',array('fname' => 'txt_fname'));
?>
<input type="submit" name="button" id="button" value="Search" /></form>
in the controller, i wrote
Code:
function do_search()
{
$first_name = $this->input->post('fname');
$this->load->model('search_model');
$data['search_details'] = $this->search_model->search($first_name);
$this->load->view('search_results', $data);
}
but i am not getting $first_name value in the model. that means, the value is not passing from view to controller.
where i am making mistakes???
can you please help me?