Reputation: 1427
I'm trying to call this 'search' method using form_input:
-- controller
function search($item_to_search, $page_to_display)
{
//do this and that
}
-- view
<?php
echo form_open("admin/admin_product_c/search/[words come here]/0"); <-- no clue what to do here..
echo form_input('search_data', 'Type the words to search');
//submit button here
?>
Is there a way to fill out and complete the form_open when clicking the submit button so that I can pass values via URL? I'd like to avoid using Session / POST in this case if possible because keeping things in one format really helps me out.
Upvotes: 0
Views: 128
Reputation: 12197
See my answer here:
How to make dynamic form action address in codeigniter?
There are two solutions you can choose from - with JavaScript or without, I think the second one fits you.
Upvotes: 1