Question: I want to be able to user query strings in this fashion. `Domain.com/controller/function?param=5&otherparam=10`

In my config file I have 

```
$config['base_url'] = 'http://localhost:8888/test-sites/domain.com/public_html';
$config['index_page'] = '';
$config['uri_protocol'] = 'PATH_INFO';
$config['enable_query_strings'] = TRUE;

```

The problem that I am getting is that `form_open` is automatically adding a question mark (?) to my url. 

So if I say:

```
echo form_open('account/login');

```

it spits out: `http://localhost:8888/test-sites/domain.com/public_html/?account/login`

Notice the question mark it added right before "account".

How can I fix this?

Any help would be greatly appreciated!

Answer: 
The source of your problem is in the Core Config.php file where the CI\_Config class resides. The method site\_url() is used by the form helper when you are trying to use form\_open function.
Solution would be to override this class with your own. If you are using CI < 2.0 then create your extended class in application/libraries/MY\_Config.php, otherwise if CI >= 2.0 then your extended class goes to application/core/MY\_Config.php.
Then you need to redefine the method site\_url().

```

class MY_Config extends CI_Config
{
   function __construct()
   {
      parent::CI_Config();
   }

   public function site_url($uri='')
   {
      //Copy the method from the parent class here:
      if ($uri == '')
      {
         if ($this->item('base_url') == '')
     {
        return $this->item('index_page');
     }
     else
     {
        return $this->slash_item('base_url').$this->item('index_page');
     }
      }

      if ($this->item('enable_query_strings') == FALSE)
      {
         //This is when query strings are disabled
      }
      else
      {
         if (is_array($uri))
     {
        $i = 0;
        $str = '';
        foreach ($uri as $key => $val)
        {
           $prefix = ($i == 0) ? '' : '&';
           $str .= $prefix.$key.'='.$val;
           $i++;
        }
            $uri = $str;
         }
         if ($this->item('base_url') == '')
     {
            //You need to remove the "?" from here if your $config['base_url']==''
        //return $this->item('index_page').'?'.$uri;
            return $this->item('index_page').$uri;
     }
     else
     {
            //Or remove it here if your $config['base_url'] != ''
        //return $this->slash_item('base_url').$this->item('index_page').'?'.$uri;
            return $this->slash_item('base_url').$this->item('index_page).$uri;
     }
      }
   }
}

```

I hope this helps and I think you are using CI 2.0 that wasn't officially released, this was removed in the official CI 2.0 version
If you want to use query string in your url structure, then you should manually type your url structure in the following order: 

```
<domain.com>?c={controller}&m={function}&param1={val}&param2={val}

```

in the action of the resepective controller you should get the parameter as `$_GET['param1']`

your code now should look like this 

```
form_open(c=account&m=login&param1=val)

```

Please let me know if it doesnt work for you.