title: How to add parameter in URL in CakePHP form submit?
body: <p>Please check my code:</p>
  
  <pre><code>&lt;?php
      $base_url = array('controller' =&gt; 'postads', 'action' =&gt; 'search/category:sales');
      echo $this-&gt;Form-&gt;create("Filter",array('url' =&gt; $base_url, 'class' =&gt; 'filter'));
  ?&gt;
  &lt;?php echo $this-&gt;Form-&gt;input('minprice',array('type'=&gt;'text','placeholder'=&gt;'Min','label'=&gt;false,'value'=&gt;100));?&gt;
  &lt;?php echo $this-&gt;Form-&gt;input('maxprice',array('type'=&gt;'text','placeholder'=&gt;'Max','label'=&gt;false,'value'=&gt;200));?&gt;
  &lt;?php echo $this-&gt;Form-&gt;input('Go',array('type'=&gt;'submit','label'=&gt;false));?&gt;
  &lt;?php echo $this-&gt;Form-&gt;end();?&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>public function search(){
      if(($this-&gt;request-&gt;is('post') || $this-&gt;request-&gt;is('put')) &amp;&amp; isset($this-&gt;data['Filter'])){
      //pr($this-&gt;data);exit;
              foreach($this-&gt;data['Filter'] as $name =&gt; $value){   
                  if($value){
                      $filter_url[$name] = urlencode($value);
                  }
              }
              //return $this-&gt;redirect($filter_url);
          }
  }
  </code></pre>
  
  <p>When i submit the page my URL looks like <a href="http://www.example.com/postads/search/minprice:100/maxprice:200" rel="nofollow">http://www.example.com/postads/search/minprice:100/maxprice:200</a></p>
  
  <p>But i want to <a href="http://www.example.com/postads/search/category%3asales/minprice:100/maxprice:200" rel="nofollow">http://www.example.com/postads/search/category:sales/minprice:100/maxprice:200</a></p>
  
  <p>Please solve my problem</p>
  
  <p>Thanks
  learnphp.in</p>