self referencing links?

From: Date: Fri, 09 Apr 2004 03:07:24 +0000
Subject: self referencing links?
Groups: php.general 
Request: Send a blank email to php-general+get-182944@lists.php.net to get a copy of this message
hi... i have a page called ViewEvents.php. at the top of the page and at the bottom of the page there is a bar with links on them jan-dec and view all. all 13 links are supposed to call the same page(ViewEvents.php) each link with a different query string. for example: jan=ViewEvents.php?request_month=1 and so on.. each one (link) will bring up different content on the page. was wondering how i would go about doing this? should i write a function for it? (the results of request_month are comming from a mysql db). something like this: function PageReload($request='0'){ if($request==0){ //query for view all link} else { //query for 1-12 (jan-dec links) } then i could use it like this: <? PageReload($QUERY_STRING); ?> <!-- show page content here--> maybe ill have to play with the idea but just making sure im on the right idea

« previous php.general (#182944) next »