Q:

Codeigniter: Pass form variable into URI

Not sure if this can be done but it seems my main issue is because i have a default route to a method called "index."  I want to be able to list all users tagged with a specific keyword.  In addition, users can search for other users based on these keywords. 
i.e.
www.domain.com/tags/apples
www.domain.com/tags/oranges
www.domain.com/tags/blueberry
It works fine if I go to the URL manually.  I'm having issues getting it to work with a form field. 
Snippet of the form_open:
<? =form_open('tags/');? >

<p>Search for Tag: <input type="text" name="tag" /></p>    
<p><input type="submit" value="Search" /></p> 

Here's a snippet of my controller:
function index() {
    $data['result'] = $this->tags_model->searchByTag($this->uri->segment(2));
    $this->load->view('tags_view', $data);
} 

Here's a snippet of my router:
$route['tags'] = "tags/index";
$route['tags/(:any)'] = "tags/index/$1"; 

Now, I can easily fix all this if I have a method called search, but I don't want the URL to show up as www.domain.com/tags/search/orange. 

A:

When you create your form you set it to use POST variables instead of GET, that way they don't go through the url, that's codeigniter's default method for forms. 
So your form_open code will generate the following code:
 <form method="post" action="tags/" />

If you want them to got through url though, call the form opener this way instead:
form_open('tags/', array('method' => 'get'));

The same applies to any other attributes you want to specify for the form, just follow the same pattern attribute_name => attribute_value inside the array. 
More info on the user guide

A:

I ended up redirecting the URL and passed the keyword into the URI. 
i.e. domain.com/tags/view/

