So, the link might look like:

<a href="page.php?item=1">item 1</a>

Then page.php might look like this:

<?
include("{$item}.php");
?>

BUT this would be smarter:

<?
// uncomment this next line if you have register_globals OFF
// $item = $_GET['item'];

if(empty($item))
    {
    // set a default item number
    $item = 1;
    }

$file = "{$item}.php3";
if(file_exists($file))
    {
    include($file);
    }
else
    {
    echo "sorry, file {$file} not found";
    }
?>


Enjoy!


Justin


on 18/11/02 11:07 PM, Cyclone Médias ([EMAIL PROTECTED])
wrote:

> Hi! 
> 
> I need to solve this problem:
> 
> I have a menu bar on my main page and a dynamic zone on the others levels of
> my html/php site. When I am clicking the 'item 1' on my menu, I want to load
> item1.php3 in the dynamic section of the next page.
> 
> So I think I have to use sometinng like get variable in the adress bar and
> after put on my 'next page'  <include $var.php3> or something like that ?
> 
> 
> As you can see I'm a newbie and  a quebecer so, sorry for my english and
> thanks for your help!
> 
> Ben
> 

Justin French
--------------------
http://Indent.com.au
Web Developent & 
Graphic Design
--------------------


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to