how to pass hidden values by HTTP headers?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sams

    how to pass hidden values by HTTP headers?

    I have a script passing value to a next php page, but the value
    appears in the headder, making it visible. How do I hide the value?

    header("Locatio n:http://$HTTP_HOST/$DOCROOT/registration_su ccess.php?useri d=$userid");

    Appreciate any pointer.

    TIA

    Sam
  • Sandman

    #2
    Re: how to pass hidden values by HTTP headers?

    In article <4d010e73.04031 70729.563c913b@ posting.google. com>,
    sams@freeddns.o rg (sams) wrote:
    [color=blue]
    > I have a script passing value to a next php page, but the value
    > appears in the headder, making it visible. How do I hide the value?
    >
    > header("Locatio n:http://$HTTP_HOST/$DOCROOT/registration_su ccess.php?useri d=$u
    > serid");[/color]

    You could use sessions, and store the values in $_SESSION["userid"], or you
    could encode the variable in some way, to make it less obvious what you're
    trying to do.

    session_start() ;
    $_SESSION["userid"] = $userid;
    header("Locatio n:http://$HTTP_HOST/$DOCROOT/registration_su ccess.php");

    --
    Sandman[.net]

    Comment

    • Chung Leong

      #3
      Re: how to pass hidden values by HTTP headers?

      Uzytkownik "sams" <sams@freeddns. org> napisal w wiadomosci
      news:4d010e73.0 403170729.563c9 13b@posting.goo gle.com...[color=blue]
      > I have a script passing value to a next php page, but the value
      > appears in the headder, making it visible. How do I hide the value?
      >
      >[/color]
      header("Locatio n:http://$HTTP_HOST/$DOCROOT/registration_su ccess.php?useri d=
      $userid");

      Stick them into a cookie.


      Comment

      Working...