session and PHPSESSID with mobile browser

This is a discussion on session and PHPSESSID with mobile browser within the PHP Language forums, part of the PHP Programming Forums category; Hi ! I would like to propagate data between php pages, in two cases : the pages are read by : 1- Internet ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-27-2003
Arnaud
 
Posts: n/a
Default 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)


Reply With Quote
  #2 (permalink)  
Old 10-27-2003
jn
 
Posts: n/a
Default Re: session and PHPSESSID with mobile browser

"Arnaud" <green-cove@wanadoo.fr> wrote in message
news:bnjlom$brp$1@news-reader3.wanadoo.fr...
> 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)
>


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

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


Reply With Quote
  #3 (permalink)  
Old 10-28-2003
Jochen Daum
 
Posts: n/a
Default Re: session and PHPSESSID with mobile browser

Hi Arnaud!

On Mon, 27 Oct 2003 18:47:58 +0100, "Arnaud" <green-cove@wanadoo.fr>
wrote:

>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 ?


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/
Reply With Quote
  #4 (permalink)  
Old 10-28-2003
Arnaud
 
Posts: n/a
Default Re: session and PHPSESSID with mobile browser

Thanks a lot !
Arnaud.

"jn" <jsumner1@cfl.rr.com> a écrit dans le message de
news:6Tgnb.71763$ox6.1027208@twister.tampabay.rr.c om...
> "Arnaud" <green-cove@wanadoo.fr> wrote in message
> news:bnjlom$brp$1@news-reader3.wanadoo.fr...
> > 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)
> >

>
> You have to set the session id on the next page before you call your
> session.
>
> session_id($_GET['PHPSESSID']);
> session_start();
> //you should now be able to access your session variables
> echo $_SESSION['mysessionvar'];
>
>



Reply With Quote
  #5 (permalink)  
Old 10-28-2003
Arnaud
 
Posts: n/a
Default Re: session and PHPSESSID with mobile browser

Thanks a lot !
Arnaud.

"Jochen Daum" <jochen.daum@cans.co.nz> a écrit dans le message de
news:1ekrpv4t82ctgdft6850b9asiuo8ru23oa@4ax.com...
> Hi Arnaud!
>
> On Mon, 27 Oct 2003 18:47:58 +0100, "Arnaud" <green-cove@wanadoo.fr>
> wrote:
>
> >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 ?

>
> 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/



Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 06:28 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0