>> My problem is that for one page in the site I need to
>> display a image in the navigation bar that is referenced
>> from a database.  The database query happens in the included
>> file which is below the navigation in the html - This means
>> i cant reference the image file name because the query hasnt
>> happened.

I don't believe this can be done in any simple way.  Javascript is certainly
not your answer, regardless of if it "can" do it, it's just not smart to
place such a burden (navigation of the site) onto JS, which will inevitably
break, or won't be available, or will be off.

What you need to do is change your include file to do the following, and
include it above the nav bar:

- do the query
- create the navigation
- create a $output var, which you use instead of echo, which renders the
stuff you'll use further down the page. eg:

// do query

// build navigation

// create output to be used later
$output = "";
$output .= "something something\n";
$output .= "something else\n";

<!-- other stuff, then finally: -->

Justin French

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

Reply via email to