Hi there.
I have just 1 page, index.php
in the main content, im pulling in variables for 12 weeks of work using:
$index = new Page();
$weeklypages = new Page_pages();
$weeklypages->pg_1 = $_GET['week1_page'];
week 2 etc etc
under this i have the option to switch the style of the menu, for it to work, i had to code it like this:
$index = new Page();
$menu = new Page_menu();
$menu->menu_1 = $GET['menuone'];
$menu->menu_2 = $GET['menutwo'];
$menu->menu_3 = $_GET['menuthree'];
these are called by:
<?php $weeklypages->display_weeklypages(WEEK1, WEEK2, etc etc); ?>
(similar setup for the menu, just names changed)
in the classes:
class Page_pages {
var $pg_1;
($pg_2; through to 12)
function display_weeklypages($page_one, $page_two, $page_three, $page_four, $page_five, $page_six, $page_seven, $page_eight, $page_nine, $page_ten, $page_eleven, $page_twelve) {
if(isset($this->pg_1)) {
echo $page_one;
}
elseif(isset($this->pg_2)) {
echo $page_two;
} etc etc
else {
echo $page_one;
}
}
}
(similar setup for the menu, just names changed)
the thing is, when u go from week to week, it's fine, but when you change the menu style (the menu consists of rollovers which dont work by css styling) the page defaults back to week1_page.
basically, if i could get some sort of function to work whereby I have the button and can sinply echo the menu, it might stop this happening, cos i think at the moment the $index new Page is what's causing the problem.
Is there a way to have
<img rollover button href='<?php echo(MENU1);?>
<img rollover button2 href='<?php echo(MENU2);?>
obviously im making this up, but any help/advise would be much appreciated!
many thanks!
rach