title: Combine multiple forms $_GET values into query string
body: <p>So, i have 2 forms to filter products, one with checkboxes and the other with select options.</p>
  
  <p>When i check one checkbox the form is submited and the query string is updated with it's value, when i check another checkbox the same happens, but when i select a option, the current query string resets and add only that option value instead of adding it after or before the current query.</p>
  
  <p>What i want is to unite both $_GET indexes in the query string, independent of the order of submit. How can i do this? I'll be grateful if someone knows.</p>
  
  <pre><code>$marca_get = isset($_GET['marca']) &amp;&amp; is_array($_GET['marca']) 
     ? $_GET['marca'] : [];
  
  if ( isset($_GET['ordem']) ) {
     if ( $_GET['ordem'] == 'vendas' ) {
        $orderby = 'vendas';
     }         
     if ( $_GET['ordem'] == 'avaliacoes' ) {
        $orderby = 'avaliacoes';
     }
  }
  
  &lt;form method="get"&gt;
   &lt;input type="checkbox" id="amd" class="checkbox-filtro" name="marca[]" 
   value="amd"&gt;
   &lt;label for="amd"&gt;AMD&lt;/label&gt;
   &lt;input type="checkbox" id="intel" class="checkbox-filtro" name="marca[]" 
   value="intel"&gt;
   &lt;label for="intel"&gt;Intel&lt;/label&gt;
  &lt;/form&gt;
  
  &lt;form method="get"&gt;
   &lt;select id="ordem" name="ordem"&gt;
    &lt;option value="vendas"&gt;Mais vendidos&lt;/option&gt;
    &lt;option value="avaliacoes"&gt;Melhor avaliados&lt;/option&gt;
   &lt;/select&gt;
  &lt;/form&gt;
  
  $('#ordem, .checkbox-filtro').on('change', function() {
    this.form.submit();
  });
  </code></pre>