$get multiple variables from url

Tritbrangicacam

New Member
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. \[code\]<?phpwhile ( $a_row = mysql_fetch_row( $result ) ){ foreach ( $a_row as $field ){?><a href="http://stackoverflow.com/questions/3718051/images.php?event=<?php echo $field;?>"> <php? echo $field; ?> </a><?php }}?>\[/code\]When the link is clicked a script gets the variable from get in the url: \[code\]/images.php?**event**=eventCalledParty\[/code\]\[code\]foreach($_GET as $value){$event = $value;}$event = mysql_real_escape_string($event);\[/code\]My question is - If i was to implement categories and have a url that looks like: \[quote\] /images.php?event=eventCalledParty&category=categoryCalledFashionPhotography\[/quote\]How would i seperate these two variables from the url to use in my queries.Thank You.
 
Top