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 Quote Link to comment 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. Quote Link to comment 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.