title: check if a querystring exists, if not create one - PHP
body: <p>I have several pages which use querystrings to highlight an option in a menu, all the url's on the page have the currant querystring phrased in them so the same menu option will be highlighted on the next page if the user clicks the link.</p>
  
  <p>However the problem arrises when someone visits the page without the querystring included in the url, the menu option isn't highlighted.</p>
  
  <p>What i would like to do is check the URL to see if a querystring is present, if one isnt, create one.</p>
  
  <p>The url's are phrased as such <code>www.mysite.co.uk/Folder1/Folder2/Page.php?id=3</code></p>
  
  <p>and i would like the default querystring to be <code>?id=1</code> if one isn't already present in the url.</p>
  
  <p>Any ideas on how you do this?</p>
  
  <p>And what would happen if a user visits using the URL <code>www.mysite.co.uk/Folder1/Folder2/Page.php?</code></p>
  
  <p>Would the URL end up as <code>www.mysite.co.uk/Folder1/Folder2/Page.php??id=1</code></p>
  
  <p>or would it be <code>www.mysite.co.uk/Folder1/Folder2/Page.php?id=1</code></p>
  
  <p>Thanks,</p>