I'm trying to change the title of the page when the content reloads. I'm trying to do this through a global variable in the title section below.
here is my code so far:
<title>
UITS Web Hosting Services - <?php global $page_title; if (!isset($_GET['active_page'])) /* if page title IS NOT set through GET, then echo default title */ { echo"Home Page and Informationn"; } else /* page_title is set through GET */ { echo"$page_titlen"; } ?>
</title>and in the main program
$active_page = $_GET['active_page'];
global $page_title;
$page_title = m00;
echo"page title is: '{$GLOBALS['page_title']}' - blahh";
if ($active_page == 'index')
{
include ('site_content/index_content.htm');
$page_title = "Home Page and Information";
echo"'$page_title'";
}the GLOBALS array isn't printing out anything for [page_title] leading me to believe the program doesn't recognize it as a global variable (for some reason). it prints out the correct value at the end of the if statement, but yet thats not changed in the title. (probably because its not recognized as global). only if I added the value m00 (which I did) to page title did it print out anything, but again just in the page, and not in the title.
also, anyone know why I can't say global $page_title = value;? it won't let me assign it anything and gives me a parse error instead. I have to break it up right now into global $page title and then $page_title = value; on the next line...I'd like to avoid this.
any ideas? thanks








Sign In »
Register Now!
Help

MultiQuote
