nested navigation and lost passed variables

another question if you don’t mind! :lol:


<?php $essays = "essays"; $poetry = "poetry"; $design = "design"; $architecture = "architecture"; $forum = "forum"; $about = "about"; /*if (isset($_GET['header_id'])) { $header_id = $_GET['header_id']; } else { $header_id='02'; } //default*/ //used to catch navigation calls to switch pages switch ($header_id) { case '01': $item_one = $essays; $item_two = $poetry; $item_three = $design; $item_four = $architecture; $item_five = $forum; $item_six = $about; break; case '02': $item_one = $poetry; $item_two = $essays; $item_three = $design; $item_four = $architecture; $item_five = $forum; $item_six = $about; break; case '03': $item_one = $design; $item_two = $essays; $item_three = $poetry; $item_four = $architecture; $item_five = $forum; $item_six = $about; break; case '04': $item_one = $architecture; $item_two = $essays; $item_three = $poetry; $item_four = $design; $item_five = $forum; $item_six = $about; break; case '05': $item_one = $forum; $item_two = $essays; $item_three = $poetry; $item_four = $design; $item_five = $architecture; $item_six = $about; break; case '6': $item_one = $about; $item_two = $essays; $item_three = $poetry; $item_four = $design; $item_five = $architecture; $item_six = $forum; break; } ?> Untitled Document
entelesis . . <?php echo ($item_one); ?> <?php echo ($item_two); ?> • <?php echo ($item_three); ?> • <?php echo ($item_four); ?> • <?php echo ($item_five); ?> • <?php echo ($item_six); ?>


the main content page (design.htm)

<table width="100%" height="88%"  border="0" cellpadding="01" cellspacing="0">
    <td width="100" align="center" valign="top" class="unnamed1"><p>		
		<a href="navtest.php?imagetoshow=image01_large.jpg"><img src="image01_icon.jpg" width="59" height="60" border="0"></a><BR>
        <a href="navtest.php?imagetoshow=image02_large.jpg"><img src="image02_icon.jpg" width="89" height="60" border="0"></a><BR>
        <a href="navtest.php?imagetoshow=image03_large.jpg"><img src="image03_icon.jpg" width="74" height="60" border="0"></a></p>    </td>
    <td align="center" valign="middle">&nbsp;
		echo('<img src="' . $imagetoshow . '">');
		echo('<center> paste info from database for ' . $imagetoshow . '</center>');
		?>	</td>
    <td width="100" align="center" valign="middle">&nbsp;</td>

sorry for posting so much code… the problem is basically when I click the design link in the header it gives me a newly arranged header and a main design page. but when I click in the design page for it to show a new image the header looses it’s passed variable giving my the default main page (essays)… I hope that made sense… :lol:

sorry, php tags in here don’t seem to work for me… :(

why not send both peices of info in the URL (header_id and main content - minus header). You might want to check into some basic templating. http://www.codewalkers has a tutorial in the basics section. I would alter the template so that it can take your header_id and display it however you desire, and the main content goes in the center.

ah, that’s what I ended up doing… I actually got a nice “switching” header moving then promptly dumped it for a static one… lol 'twas a nice learning experience however… my problem was that I expected the passed variable to be retained upon refresh, but then that would go against the idea of being able to bookmark the pages… so every variable has to be repassed with every reload…

ok, easy enough… had my book only taken the three lines it would have taken to write that and write that I wouldn’t have been so blasted confuddled… …stead I get one line on how to pass external variables with no example of passing multiple… /

check into some basic templating<

will do… gonna read what I can and stay quiet for a while so’s to avoid another nescient “brain dump”, as showed above. lol :-?


Sponsor our Newsletter | Privacy Policy | Terms of Service