title: Pass unencoded url from form
body: <p>I've set up a search box on the homepage, that should link into the Opencart search by passing a URL.</p>
  
  <p>The problem I'm having is that the resulting URL is always unencoded:</p>
  
  <p><code>store/index.php?route%3Dproduct%2Fsearch%26filter_name=test</code></p>
  
  <p>What I'm aiming for is</p>
  
  <p><code>store/index.php?route=product/search&amp;filter_name=test</code></p>
  
  <p>My current code is:</p>
  
  <pre><code>&lt;?php
  $storesearch = $_REQUEST['store-search'] ;
  $filter = 'route=product/search&amp;filter_name';
  $filtered = html_entity_decode($filter);
  ?&gt;
  &lt;form id="store" method="GET" action="http://localhost/vinmobile/store/index.php?&lt;?php echo $storesearch; ?&gt;"&gt;
  &lt;input type="text" id="store-search" name="&lt;?php echo $filtered; ?&gt;" value="Store Search" onclick="this.value = '';"&gt;
  &lt;input type="submit" name="" value="Search"&gt;
  
  &lt;/form&gt;
  &lt;?php echo $filtered; ?&gt; // Just to show it onscreen to make sure it's written correctly
  </code></pre>
  
  <p>I've tried encode, decode, html_entity_decode, urldecode, rawurldecode...
  I've tried the form method as <code>GET, POST</code>
  I've tried the variable declaration as <code>$_REQUEST, $_GET, $_POST</code></p>
  
  <p>Every time, I still end up with the url looking like:</p>
  
  <p><code>store/index.php?route%3Dproduct%2Fsearch%26filter_name=test</code></p>
  
  <p>I'm sure it's something simple I've missed, but I 'think' I've tried everything and would be very grateful if someone could point me in the right direction.</p>
  
  <p>Cheers</p>
  
  <p>webecho</p>