|
|
 |
Re: FN-FORUM: Re: session maintainance from parent to popup
date posted 5th December 2007 13:13
On 5 Dec 2007 08:50:29 -0000, Anuj Garg [EMAIL REMOVED] wrote:
>
> > Stuck into a problem. Trying to pass session values from parent to
> > popup window. But failed.
> > I am using the following:
> >
> > session.php (parent window):
> > session_start();
> > $value1=$_SESSION['name'];
> > echo "','name1','height=320,width=240');\">pop-up[/url]";
> >
> > page.php (popup window):
> > $a=session_id(strip_tags($_GET['sid']));
> > session_start();
> > echo $a;
> >
> > 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.
> >
> > Any thoughts?
> >
You should either use $_SESSION or $_GET to pass the variable. So:
using $_SESSION:
session.php (parent window):
session_start();
echo "pop-up[/url]";
page.php (popup window):
session_start();
echo $_SESSION["name]";
or using $_GET:
session.php (parent window):
session_start();
$value1=$_SESSION['name'];
echo " |
 |
|