Possible Duplicate:
How to make dynamic form action address in codeigniter?
I have the following that creates a form with an input field for entering search terms. I need to be able to type the search terms into that field, and upon clicking the submit button, it needs to go to a URL in the format of site.com/search/search+terms
Basically, I need GET but formatted differently. How can I do this?
<?php echo form_open('search', array('id' => 'site-search', 'class' => 'form-search pull-right')); ?>
<div class="input-append">
<input type="text" class="input-medium search-query" id="site-search-field" placeholder="Search">
<button type="submit" class="btn btn-inverse" id="site-search-submit"><i class="icon-chevron-right icon-white"></i></button>
</div>
<?php echo form_close(); ?>
See my answer here: How to make dynamic form action address in codeigniter?
What you need is a controller method that accepts POST data and uses
redirect()with arguments from POST in it.