title: href to name and pass $_GET variable
body: <p>I have to links:</p>
  
  <pre><code>&lt;a href="page2.php#anchor1"&gt;link 1&lt;/a&gt;
  &lt;a href="page2.php#anchor2"&gt;link 2&lt;/a&gt;
  </code></pre>
  
  <p>However, I want to add an extra parameter, link so:</p>
  
  <pre><code>&lt;a href="page2.php#form?type=small"&gt;link 1&lt;/a&gt;
  &lt;a href="page2.php#form?type=large"&gt;link 2&lt;/a&gt;
  </code></pre>
  
  <p>Using php, I need to check if my <code>$_GET</code> isset, I need to use it to control an element in my form, like so:</p>
  
  <pre><code>&lt;select id="type" name="type"&gt;
      &lt;option value="sm" &lt;?php if(isset($_GET['type']) and ($_GET['type'] == "small")) { echo 'selected="selected"'; } ?&gt;&gt;Small&lt;/option&gt;
      &lt;option value="lg" &lt;?php if(isset($_GET['type']) and ($_GET['type'] == "large")) { echo 'selected="selected"'; } ?&gt;&gt;Large&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <h2> Important details</h2>
  
  <ul>
  <li>If this is important, I am using my .htaccess to remove the .php extension; could that be a factor?</li>
  <li>Page 2 can be accessed without filling in Page 1, but is not required; If none is set from the $_GET, none should be selected, otherwise, the proper value should be selected.</li>
  </ul>