title: Getting the previous page GET parameters in PHP
body: <p>I have a range of similar pages that have a URL along the lines of <code>www.mydomain.com/group?id=1</code>.</p>
  
  <p>From each of these pages there is a form that posts it's values to the server. I need to work out what the <code>id</code> of the group was when the form is posted. I'm aware of being able to use <code>$_SERVER['HTTP_REFERER']</code> and then maybe I could use a regex to get the <code>id</code>. However, I wondered if there was anything in PHP that would allow you to get the previous $_GET variables?</p>
  
  <p>Alternatively, do people think it is a much better idea to store the current group id as a session variable?</p>