When I load my site, default.php loads ( displaying: in the browser as expected). $thisPage is
set to "about" via:

if (!isset($thisPage)) {
 } else {
 $thisPage = addslashes($_GET['page']);

in the <head> tags.

I am seeing this:

The first 2 includes work just fine, loading to proper middle section and
proper right-hand-side page content, the navigation include also loads, but
all the of "tabs" (background images) are the currentpage image, as opposed
to not, as they should be (the the exception of the About Us background

It seems that $thisPage is equal to all four values, so all the if
statements within navigation tell PHP to load the current page image for all
4 links.

Does this help?
On Wed, Aug 5, 2009 at 10:10 AM, Jerry Wilborn <>wrote:

> I'm having trouble understanding your description of the problem.  Can you
> tell us what you're seeing and what you expect to see?
> Jerry Wilborn
> On Wed, Aug 5, 2009 at 12:00 PM, Allen McCabe <>wrote:
>> I am trying to generate pages by importing content in includes, and using
>> my
>> navigation include to tell PHP to replace a $thisPage variable which all
>> the
>> includes use <?php include('phpincludes/' . $thisPage . '.php') ?>
>> The idea behind it (I know tons of people do it, but I'm new to this
>> concept), is to have a 'layout' page where only a variable changes using
>> $_GET on an href (index.php?page=services or index.php?page=about) to load
>> the new 'pages'.
>> All my links are displaying the current page state, and links are not
>> building around the link text (hrefs are built conditionally with if
>> $thisPage != services then build the link, otherwise leave it as normal
>> text). Same thing with the background image behind the link text (to
>> indicate a page's current position). If the condition is not true, all the
>> links (except the true current 'page') are supposed reload index.php and
>> pass a variable to itself to place into $thisPage using
>> href="index.php?page=" (after which I have a variable which stores "about"
>> or "services" within the if statement near the link text.
>> If this sounds like something you are familiar with (former issues and
>> whatnot) please let me know what I'm doing wrong. I would be happy to give
>> you any code you want to look at (index.php or navigation.php, whatever).
>> Thanks again for your help PHP gurus!

Reply via email to