title: $get multiple variables from url
body: <p>I am making a photography website. In the DB there is an images table, events table and category table which as linked via foreign keys. At the moment i generate events from when a photo was taken from the database and turn them into anchor links. </p>
  
  <pre><code>&lt;?php
  while ( $a_row = mysql_fetch_row( $result ) ){
  
   foreach ( $a_row as $field ){
  
  ?&gt;
  &lt;a href="images.php?event=&lt;?php echo $field;?&gt; "&gt; &lt;php? echo $field; ?&gt; &lt;/a&gt;
  &lt;?php
   }
  }
  ?&gt;
  </code></pre>
  
  <p>When the link is clicked a script gets the variable from get in the url: <code>/images.php?**event**=eventCalledParty</code></p>
  
  <pre><code>foreach($_GET as $value)
  {
  $event = $value;
  }
  $event = mysql_real_escape_string($event);
  </code></pre>
  
  <p>My question is - If i was to implement categories and have a url that looks like:        </p>
  
  <blockquote>
    <p>/images.php?<strong>event</strong>=eventCalledParty&amp;<strong>category</strong>=categoryCalledFashionPhotography</p>
  </blockquote>
  
  <p>How would i seperate these two variables from the url to use in my queries.</p>
  
  <p>Thank You.</p>