pass PHPSESSID in FORM-tag

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

    pass PHPSESSID in FORM-tag

    Hello ,

    I want to pass some $_SESSION data to another page.

    I can pass PHPSESSID along using echo '<br /><a href="page2.php ?' . SID
    .. '">page 2</a>';

    However, I want to fill in a table with values and include PHPSESSID
    with it. This does not work. I tried somethink like this:
    <INPUT TYPE="Hidden" NAME="PHPSESSID " VALUE="<?=SID ?>">

    and on the next page 'retrieve' the SID
    $SID=$_POST["PHPSESSID"];

    Now probably SID is not a normal variable , but how to get this right?

    How is a call like http://page2.php?PHPSESSID=42ed32d .. processed , is
    there a variabele PHPSESSID or a variabele SID that is being used?


  • R. Rajesh Jeba Anbiah

    #2
    Re: pass PHPSESSID in FORM-tag

    edward hage <edha@xs4all.nl > wrote in message news:<3fd7a072$ 0$213$e4fe514c@ news.xs4all.nl> ...[color=blue]
    > Hello ,
    >
    > I want to pass some $_SESSION data to another page.
    >
    > I can pass PHPSESSID along using echo '<br /><a href="page2.php ?' . SID
    > . '">page 2</a>';
    >
    > However, I want to fill in a table with values and include PHPSESSID
    > with it. This does not work. I tried somethink like this:
    > <INPUT TYPE="Hidden" NAME="PHPSESSID " VALUE="<?=SID ?>">
    >
    > and on the next page 'retrieve' the SID
    > $SID=$_POST["PHPSESSID"];
    >
    > Now probably SID is not a normal variable , but how to get this right?
    >
    > How is a call like http://page2.php?PHPSESSID=42ed32d .. processed , is
    > there a variabele PHPSESSID or a variabele SID that is being used?[/color]

    PHP is a popular general-purpose scripting language that powers everything from your blog to the most popular websites in the world.


    http://in2.php.net/session See session.use_tra ns_sid

    --
    "There are two kinds of people, those who do the work and those who
    take the credit. Try to be in the first group; there is less
    competition there." -- Indira Gandhi
    Email: rrjanbiah-at-Y!com

    Comment

    • edward hage

      #3
      Re: pass PHPSESSID in FORM-tag

      R. Rajesh Jeba Anbiah wrote:[color=blue]
      > edward hage <edha@xs4all.nl > wrote in message news:<3fd7a072$ 0$213$e4fe514c@ news.xs4all.nl> ...
      >[color=green]
      >>Hello ,
      >>
      >>I want to pass some $_SESSION data to another page.
      >>
      >>I can pass PHPSESSID along using echo '<br /><a href="page2.php ?' . SID
      >>. '">page 2</a>';
      >>
      >>However, I want to fill in a table with values and include PHPSESSID
      >>with it. This does not work. I tried somethink like this:
      >><INPUT TYPE="Hidden" NAME="PHPSESSID " VALUE="<?=SID ?>">
      >>
      >>and on the next page 'retrieve' the SID
      >> $SID=$_POST["PHPSESSID"];
      >>
      >>Now probably SID is not a normal variable , but how to get this right?
      >>
      >>How is a call like http://page2.php?PHPSESSID=42ed32d .. processed , is
      >> there a variabele PHPSESSID or a variabele SID that is being used?[/color]
      >
      >
      > http://in2.php.net/manual/en/install...able-trans-sid
      >
      > http://in2.php.net/session See session.use_tra ns_sid
      >[/color]

      I already read that page but it doesn't say anything about passing SID
      in a frame.

      I am using PHP 4.3.1 so the --enable-trans-sid is already enabled.Thanks.


      Comment

      • edward hage

        #4
        Re: pass PHPSESSID in FORM-tag

        edward hage wrote:[color=blue]
        > R. Rajesh Jeba Anbiah wrote:
        >[color=green]
        >> edward hage <edha@xs4all.nl > wrote in message
        >> news:<3fd7a072$ 0$213$e4fe514c@ news.xs4all.nl> ...
        >>[color=darkred]
        >>> Hello ,
        >>>
        >>> I want to pass some $_SESSION data to another page.
        >>>
        >>> I can pass PHPSESSID along using echo '<br /><a href="page2.php ?' . SID
        >>> . '">page 2</a>';
        >>>
        >>> However, I want to fill in a table with values and include PHPSESSID
        >>> with it. This does not work. I tried somethink like this:
        >>> <INPUT TYPE="Hidden" NAME="PHPSESSID " VALUE="<?=SID ?>">
        >>>
        >>> and on the next page 'retrieve' the SID
        >>> $SID=$_POST["PHPSESSID"];
        >>>
        >>> Now probably SID is not a normal variable , but how to get this right?
        >>>
        >>> How is a call like http://page2.php?PHPSESSID=42ed32d .. processed , is
        >>> there a variabele PHPSESSID or a variabele SID that is being used?[/color]
        >>
        >>
        >>
        >>
        >> http://in2.php.net/manual/en/install...able-trans-sid
        >>
        >>
        >> http://in2.php.net/session See session.use_tra ns_sid[/color]
        >
        >
        > I already read that page but it doesn't say anything about passing SID
        > in a frame.
        >
        > I am using PHP 4.3.1 so the --enable-trans-sid is already enabled.Thanks.
        >
        >[/color]
        Found out answer for who is interested. Kind of straightforward to use
        session-data in next page by using FORM ACTION = "wisme2.php?<?= SID ?> "

        This may be usefull for somebody.

        <?php
        session_start() ;
        $_SESSION['data1']= 1 ;
        $_SESSION['data2']='hello';
        ?>
        <FORM ACTION="wisme2. php?<?=SID ?> " METHOD=POST>
        <INPUT TYPE="SUBMIT" VALUE="Verder">
        </FORM>

        Comment

        Working...