DenverR Posted July 11, 2009 Share Posted July 11, 2009 hey, im working with a php nav system where all pages are index.php?page=home or index.php?page=aboutus and i wanted to change the Title for each so i quickly wrote $p=$_GET["page"]; if ($p=="home.php") echo "Welcome to the Home Page"; elseif ($p=="aboutus.php") echo "Staff Page"; else echo "Welcome to our website."; why doesnt that work? Link to comment https://forums.phpfreaks.com/topic/165615-solved-title-based-on-page/ Share on other sites More sharing options...
Alex Posted July 11, 2009 Share Posted July 11, 2009 Because $p doesn't include the .php extension. Link to comment https://forums.phpfreaks.com/topic/165615-solved-title-based-on-page/#findComment-873567 Share on other sites More sharing options...
DenverR Posted July 11, 2009 Author Share Posted July 11, 2009 yep i just figured that out thanks Link to comment https://forums.phpfreaks.com/topic/165615-solved-title-based-on-page/#findComment-873571 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.