Problem extracting variables passed through a url
Hi I'm trying to pass two variables via a url which I can acheive, but I'm having trouble extracting the information when page refreshes.
This is the code I've used to pass the variables:_
<?php while ($row = mysql_fetch_assoc($result1)) { ?>
<a href="<?php echo $_SERVER['PHP_SELF'];?>?gallery_id=<?php echo $row['gallery_id']; ?>&year_id=<?php echo $row['year_id'];?>"><?php echo $row['name']; ?></a>
<?php } ?>
I'm able to acheive the my objective when on variable is passed using the following code:-
if (array_key_exists('gallery_id', $_GET)) {
$gallery_id = $_GET['gallery_id'];
My question is, how do I do this with two (or more) variables? I need to extract $year_id as well.
Thanks.
