query strings coming from the same page going back to the same page

From: Date: Sat, 10 Apr 2004 22:30:07 +0000
Subject: query strings coming from the same page going back to the same page
Groups: php.general 
Request: Send a blank email to php-general+get-183086@lists.php.net to get a copy of this message
was wondering if this would work or do i need different code: <?php include("libs/conf.db"); if(($_GET['month']==0)||($_GET['month']>12)){ $query="SELECT Type, StartDate, EndDate, Name, County, Notes FROM $EventsTable ORDER BY StartDate DESC"; } else { $query="SELECT Type, StartDate, EndDate, Name, County, Notes FROM $EventsTable WHERE StartingMonth='{$_GET['month']}' ORDER BY StartDate DESC";} mysql_pconnect($host, $mysqluser, $mysqlpwd)||die(mysql_error()); $result=mysql_query($query) or die(mysql_error()); ?> then i would have a link on the same page this code came from: <a href="ViewEvents.php?month=1">Jan</a> the link is supposed to reload the same page it came from and be bart of the query above... the thing im not sure of is if that will work or not or do i need something else...(new to self referrencing pages)...

« previous php.general (#183086) next »