View Single Post
Old 01-02-2005, 05:32 AM   #1 (permalink)
dakota47
Registered User
 
Join Date: Jan 2005
Posts: 1
dakota47 is on a distinguished road
Question Using parsed variable to call includes

Hello All,

My situation is that I have a standard template whereby the main content is displayed via include files. The include is called as below, with the variable ($page) being labelled and parsed to each page via the links to their respective pages.

Extremely simplified example...

<body>
<?
include ($page.".php");
?>
</body>
</html>


My problem stems from the inital page loading (default.php). How can i assign a value to $page so the initial page loads with the appropriate include, yet each subsequent page load uses the value of $page that is parsed via the clicked link?

I hope that makes sense, my brain hurts.

Cheers

Rob Smith
Canberra, AUSTRALIA
dakota47 is offline   Reply With Quote