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? Quote 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. Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.