PDA

View Full Version : How to forward a request object with request data in php?



thallasridevi
02-10-2008, 12:13 PM
Hi All,

I have page called page1.php with some hidden fields and i submitted the page to page2.php. I page2.php, i am able to get the values of hidden fields through $_REQUEST. And from this page 2 i need to forward the values of hidden fields to page3. Is any way to send the previous request directly to page3? or do i need to again write the values into hidden fields and get them in page3?I have a total of 70 hidden fields getting through the script. So i could not use sessions.

Regards,
Sridevi.

boogyman
02-11-2008, 03:07 PM
without sessions, yes you would need to assign them to a hidden field... however if you have 70 hidden fields?? why not create a session array?



$_SESSION['formVars'] = array(
'var1' => _______,
'var2' => _______,
'var3' => _______,
'var4' => _______,
'var5' => _______
);

and when you need to update just 1 element in the array you just do


$_SESSION['formVars']['var_'] = _________;

and to retrieve it you use the same principle