title: $_GET Double "WHERE" Function ?name=Hannes
body: <p>I have a question about the $_GET function. This is my code:</p>
  
  <pre><code>&lt;?php 
  $link = mysqli_connect  ('localhost', 'root', 'root', 'producten'); 
  $query =            "SELECT DISTINCT Groep, Artikelnummer, Artikelnaam, Merk, Groep, Prijs
                      FROM producten
                      WHERE Groep = '" .$_GET['groep'] . "'  
                      ";
      /*echo $query;*/
      $result = mysqli_query($link, $query);
  ?&gt;
  &lt;table&gt;
  &lt;?php
      echo '&lt;table style="width:100%"&gt;
              &lt;tr style="color:yellow; background-color:black;"&gt;
                  &lt;th&gt;' . $_GET['groep'] . '&lt;/th&gt;
              &lt;/tr&gt;';
      foreach ($result AS $rij)
  {
  
       echo '&lt;tr style="background:blue"&gt;&lt;td&gt;' . $rij['Artikelnummer'] . ' &lt;/td&gt;' . 
       '&lt;td&gt;' . $rij['Artikelnaam']   . ' &lt;/td&gt;' .
       '&lt;td&gt;' . $rij['Merk']  . ' &lt;/td&gt;' .
       '&lt;td&gt;' . $rij['Groep']     . ' &lt;/td&gt;' .
       '&lt;td&gt;' . $rij['Prijs']         . ' &lt;/td&gt;&lt;/tr&gt;';
  
  
  
  }
  ?&gt; 
  </code></pre>
  
  <p>If I go to the browser with the URL: <code>http://localhost/view.php?groep=cases</code>
  I see all the "cases" in the database but I only want to see the cases from the mark('Merk') Apple. </p>
  
  <p>Of course I needed to change the URL for that but what do I have to change in the code? Something like: <code>WHERE Groep = '" .$_GET['groep'] . "' AND Merk = '" .$_GET['merk'] . "'</code></p>
  
  <p>And the URL: <code>http://localhost/view.php?groep=cases?merk=apple</code>?</p>