session and PHPSESSID with mobile browser

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

    session and PHPSESSID with mobile browser

    Hi !
    I would like to propagate data between php pages, in two cases :
    the pages are read by :
    1- Internet Explorer
    It's ok, data are writen in one page, and read from another. I don't use
    PHPSESSID

    2- from a mobile browser ( mobile i-Mode phone Nec22)
    After several tests, I understod it's impossible, because the session system
    tries to write a cookie on the browser...

    So, I try passing PHPSESSID through the link to the next page. OK, the
    PHPSESSID can be read from the reached page. But, how do I read the other
    data written in the session variables ? What must be the order of the
    functions to retrieve my data ?

    Thanks for your ansvers, I am quite newbie with PHP.
    Arnaud
    (response mail : remove the dash from green-cove@wanadoo.fr)


  • jn

    #2
    Re: session and PHPSESSID with mobile browser

    "Arnaud" <green-cove@wanadoo.fr > wrote in message
    news:bnjlom$brp $1@news-reader3.wanadoo .fr...[color=blue]
    > Hi !
    > I would like to propagate data between php pages, in two cases :
    > the pages are read by :
    > 1- Internet Explorer
    > It's ok, data are writen in one page, and read from another. I don't use
    > PHPSESSID
    >
    > 2- from a mobile browser ( mobile i-Mode phone Nec22)
    > After several tests, I understod it's impossible, because the session[/color]
    system[color=blue]
    > tries to write a cookie on the browser...
    >
    > So, I try passing PHPSESSID through the link to the next page. OK, the
    > PHPSESSID can be read from the reached page. But, how do I read the other
    > data written in the session variables ? What must be the order of the
    > functions to retrieve my data ?
    >
    > Thanks for your ansvers, I am quite newbie with PHP.
    > Arnaud
    > (response mail : remove the dash from green-cove@wanadoo.fr)
    >[/color]

    You have to set the session id on the next page before you call your
    session.

    session_id($_GE T['PHPSESSID']);
    session_start() ;
    //you should now be able to access your session variables
    echo $_SESSION['mysessionvar'];


    Comment

    • Jochen Daum

      #3
      Re: session and PHPSESSID with mobile browser

      Hi Arnaud!

      On Mon, 27 Oct 2003 18:47:58 +0100, "Arnaud" <green-cove@wanadoo.fr >
      wrote:
      [color=blue]
      >Hi !
      >I would like to propagate data between php pages, in two cases :
      >the pages are read by :
      >1- Internet Explorer
      >It's ok, data are writen in one page, and read from another. I don't use
      >PHPSESSID
      >
      >2- from a mobile browser ( mobile i-Mode phone Nec22)
      >After several tests, I understod it's impossible, because the session system
      >tries to write a cookie on the browser...
      >
      >So, I try passing PHPSESSID through the link to the next page. OK, the
      >PHPSESSID can be read from the reached page. But, how do I read the other
      >data written in the session variables ? What must be the order of the
      >functions to retrieve my data ?[/color]

      Check your php.ini, the URL parameter is SID with my installation. If
      you transport that and call session_start() on each page, everything
      is in $_SESSION

      HTH, Jochen
      --
      Jochen Daum - CANS Ltd.
      PHP DB Edit Toolkit -- PHP scripts for building
      database editing interfaces.
      Download PHP DB Edit Toolkit for free. PHP DB Edit Toolkit is a set of PHP classes makes the generation of database edit interfaces easier and faster. The main class builds tabular and form views based on a data dictionary and takes over handling of insert/update/delete and user input.

      Comment

      • Arnaud

        #4
        Re: session and PHPSESSID with mobile browser

        Thanks a lot !
        Arnaud.

        "jn" <jsumner1@cfl.r r.com> a écrit dans le message de
        news:6Tgnb.7176 3$ox6.1027208@t wister.tampabay .rr.com...[color=blue]
        > "Arnaud" <green-cove@wanadoo.fr > wrote in message
        > news:bnjlom$brp $1@news-reader3.wanadoo .fr...[color=green]
        > > Hi !
        > > I would like to propagate data between php pages, in two cases :
        > > the pages are read by :
        > > 1- Internet Explorer
        > > It's ok, data are writen in one page, and read from another. I don't use
        > > PHPSESSID
        > >
        > > 2- from a mobile browser ( mobile i-Mode phone Nec22)
        > > After several tests, I understod it's impossible, because the session[/color]
        > system[color=green]
        > > tries to write a cookie on the browser...
        > >
        > > So, I try passing PHPSESSID through the link to the next page. OK, the
        > > PHPSESSID can be read from the reached page. But, how do I read the[/color][/color]
        other[color=blue][color=green]
        > > data written in the session variables ? What must be the order of the
        > > functions to retrieve my data ?
        > >
        > > Thanks for your ansvers, I am quite newbie with PHP.
        > > Arnaud
        > > (response mail : remove the dash from green-cove@wanadoo.fr)
        > >[/color]
        >
        > You have to set the session id on the next page before you call your
        > session.
        >
        > session_id($_GE T['PHPSESSID']);
        > session_start() ;
        > //you should now be able to access your session variables
        > echo $_SESSION['mysessionvar'];
        >
        >[/color]


        Comment

        • Arnaud

          #5
          Re: session and PHPSESSID with mobile browser

          Thanks a lot !
          Arnaud.

          "Jochen Daum" <jochen.daum@ca ns.co.nz> a écrit dans le message de
          news:1ekrpv4t82 ctgdft6850b9asi uo8ru23oa@4ax.c om...[color=blue]
          > Hi Arnaud!
          >
          > On Mon, 27 Oct 2003 18:47:58 +0100, "Arnaud" <green-cove@wanadoo.fr >
          > wrote:
          >[color=green]
          > >Hi !
          > >I would like to propagate data between php pages, in two cases :
          > >the pages are read by :
          > >1- Internet Explorer
          > >It's ok, data are writen in one page, and read from another. I don't use
          > >PHPSESSID
          > >
          > >2- from a mobile browser ( mobile i-Mode phone Nec22)
          > >After several tests, I understod it's impossible, because the session[/color][/color]
          system[color=blue][color=green]
          > >tries to write a cookie on the browser...
          > >
          > >So, I try passing PHPSESSID through the link to the next page. OK, the
          > >PHPSESSID can be read from the reached page. But, how do I read the other
          > >data written in the session variables ? What must be the order of the
          > >functions to retrieve my data ?[/color]
          >
          > Check your php.ini, the URL parameter is SID with my installation. If
          > you transport that and call session_start() on each page, everything
          > is in $_SESSION
          >
          > HTH, Jochen
          > --
          > Jochen Daum - CANS Ltd.
          > PHP DB Edit Toolkit -- PHP scripts for building
          > database editing interfaces.
          > http://sourceforge.net/projects/phpdbedittk/[/color]


          Comment

          Working...