title: Check if GET variable is already set
body: <p>I have this code that adds <code>?prside=5</code> for example. However, if you change this and the url already is <code>&amp;prside=5</code>, it just appends it again (<code>&amp;prside=5&amp;prside=40</code>).</p>
  
  <p>How do i update it instead of appending it, if it's already present?</p>
  
  <pre><code>&lt;select name="prside" onchange="document.location.href = document.location.href + \'&amp;prside=\' + this.value"&gt;
      &lt;option&gt;Annoncer pr. side&lt;/option&gt;
      &lt;option value="5"&gt;5&lt;/option&gt;
      &lt;option value="10"&gt;10&lt;/option&gt;
      &lt;option value="20"&gt;20&lt;/option&gt;
      &lt;option value="40"&gt;40&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>EDIT:
  There is other GET variables in the real URL too. And the above script does work, it's just not very pretty with multiple &amp;prside</p>