Hello,
I am ripping my hair out about this right now if anyone can help.
I am working on a news section of my webpage and I am having trouble passing the variables through my php files.
What I want to do is something like this:
news.php (the url the user visits)
<?php
$menu='../functions/news/menu.php';
$body='../functions/news/body.php';
require ('../templates/maintemplate.php');
?>
maintemplate.php
LAYOUT AND STYLE....
include ($menu);
MORE LAYOUT....
include ($body);
....
menu.php (dynamic menu)
(connects to database and for each item....)
printf ('<a href=news.php?news_item=%d>%s</a><br />', $item['id'], $item['title']);
body.php (here is where the problem is)
I would like this section to pick up the news item from the url but the variable isn't making it this far
Everything else is displaying properly, I just cant figure out how to pass the variables. I need to keep this structure in order to keep the rest of my site working.
I am using PHP 5.1.2
Thanks in advance for any help.