FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » session array not available in popup?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: session array not available in popup? [message #176988 is a reply to message #176986] Mon, 13 February 2012 20:12 Go to previous messageGo to previous message
J.O. Aho is currently offline  J.O. Aho
Messages: 194
Registered: September 2010
Karma:
Senior Member
cerr wrote:
> On Feb 13, 11:30 am, Jerry Stuckle<jstuck...@attglobal.net> wrote:
>> On 2/13/2012 2:21 PM, cerr wrote:

>>> <?php
>>> session_start();
>>> var_dump($_SESSION);
>>> ?>
>>> at the top of my popup script just prints
>>> array(0) { }
>>> and this is what the session dumps on the page from where I open the
>>> popup:
>>> string(2) "10"

If you have used

$_SESSION = "10";

then you haven't used the session as it's intended to work, try instead:

$_SESSION['integer'] = 10;


>> Is the popup accessing the same domain as the main window?
>
> Yes, they're both on the same domain, different directories tho but
> that shouldn't matter, would it?

Depends on your session.cookie_path

See: http://www.php.net/manual/en/function.session-set-cookie-params.php
http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-p ath

OT: Please remove things that you don't reply at, like signatures.


--

//Aho
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Space mistery
Next Topic: PHP 5.3.9 hex bug?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 11:45:43 GMT 2024

Total time taken to generate the page: 0.03762 seconds