Results 1 to 2 of 2

Thread: How to forward a request object with request data in php?

  1. #1
    Join Date
    Dec 2007
    Posts
    13
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default How to forward a request object with request data in php?

    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.

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    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?

    Code:
    $_SESSION['formVars'] = array(
         'var1' => _______,
         'var2' => _______,
         'var3' => _______,
         'var4' => _______,
         'var5' => _______
    );
    and when you need to update just 1 element in the array you just do
    Code:
    $_SESSION['formVars']['var_'] = _________;
    and to retrieve it you use the same principle

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •