title: Include url data in url
body: <p>I have a need where I go to a given page, log the user on if authenticated, and then redirect to another page.  My question revolves around including the url to the other page in the url which goes to the first page.</p>
  
  <p>I have a link which looks like <code>index.php?pg=page1&amp;controller=default&amp;data=123&amp;nextPg=xxx</code>.</p>
  
  <p>While I showed nextPg as xxx, I want it to be <code>pg=page2&amp;controller=whatEver&amp;data=432</code>.</p>
  
  <p>I obviously can't do this as the names are duplicated.  I could change the names of the second URL or make the first and second ones arrays, however, would rather not. Ideally, when getting to the first page, my $_GET could be converted to something like the following:</p>
  
  <pre><code>array(
    'pg'=&gt;'page1',
    'controller'=&gt;'default',
    'data'=&gt;123,
    'nextPg'=array('pg'=&gt;'page2','controller'=&gt;'whatEver','data'=&gt;321)
  )
  </code></pre>
  
  <p>How is this best accomplished?</p>