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.
I have a link which looks like index.php?pg=page1&controller=default&data=123&nextPg=xxx
.
While I showed nextPg as xxx, I want it to be pg=page2&controller=whatEver&data=432
.
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:
array(
'pg'=>'page1',
'controller'=>'default',
'data'=>123,
'nextPg'=array('pg'=>'page2','controller'=>'whatEver','data'=>321)
)
How is this best accomplished?