1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Passing Variables in Header call

Discussion in 'PHP' started by msullivan3, Apr 27, 2009.

  1. msullivan3

    msullivan3 New Member

    Joined:
    Apr 27, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    The certain webpage I have has a username that is passed from a form on a different page. All I simply want to do is pass the same variable along to the next page when I call: header( 'Location: admin.php' ) ;

    Is there a better way of going to a next page or is there an easy way to pass a variable along with this call?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    3 ways you can get them in the new location

    1. Passing with the URLs
    2. Setting the session
    3. Setting the cookie
     
  3. msullivan3

    msullivan3 New Member

    Joined:
    Apr 27, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    thanks shabbir. i ended up using the cookie method.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,276
    Likes Received:
    364
    Trophy Points:
    83
    Thats great
     

Share This Page