Re: FN-FORUM: Re: session maintainance from parent to popup
date posted 5th December 2007 08:26
Quoting Anuj Garg [EMAIL REMOVED]
> the thing is that whenever I click the button to open popup window, it
> appears with blank page. Also, the parent window also gets submitted.
> How can I solve these problems? In short, session value is not
> appearing in pop-up.
OK, first dumb-ass question : Will it not work with just the session
var anyway?
Second : $a = session_id(etc) - you're assigning $a with the value of
session_id, which doesn't exist. If you just make $a = $_GET['sid'] ,
that might work.
Third : I think session_start() has to be pretty much the first line
of the file, so that may be screwing things up a bit too. But you're
not assigning anything to the session, so is the session relevant at
this point anyway?
So basically, what you're looking for is (in the popup code)
session_start();
$a = strip_tags($_GET['sid']);
echo $a;