sphinx Posted October 19, 2010 Share Posted October 19, 2010 im trying to get a different title when links like: site.com/?off, and site.com/?off1 display the same title, but ?on displays a diff title however, it doesnt seem to work properly, im using the code below: <?php if ((isset($_GET['off'])) && (isset($_GET['off1']))) echo "<title>Url - Statistics</title>" ?> <?php $link ='hits.php?on'; if (isset($_GET['on'])) echo "<title>Url - Statistics - Auto refreshing.....</title>" ?> thanks when i type site.com/?off into my browser, no title is displayed Link to comment https://forums.phpfreaks.com/topic/216272-changing-the-title-using-multiple-isset/ Share on other sites More sharing options...
Pikachu2000 Posted October 19, 2010 Share Posted October 19, 2010 For starters, you have a logical problem with that code. If the URL ends up as hits.php?off=&off1=&on=, 2 title tags end up in the html. You need to use if/elseif/else syntax or switch statements. Link to comment https://forums.phpfreaks.com/topic/216272-changing-the-title-using-multiple-isset/#findComment-1123930 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.