Hi again.

 

I am having a problem with session variables spanning over different
windows.

What I am doing is to supply links in an admin interface that open satellite
windows, opened via JS. The window scripts check for a variable to be
present ($_SESSION[]). I am doing this so that the scripts cannot be called without
being successfully logged in.

The problem is this:

Opening the first window is fine, but when closed (with window.close()) and
tried to reopen, the $_SESSION variable test works out to be false. Why?

 

I am passing the session number through to the windows (as a variable called
$sesi). I checked the session folder, and it seems that the session is not
destroyed. All scripts call session_start(). What is happening? I know that
the manual says that we have to send the session number to the next pages.

Does it have anything to do with JS (I doubt).

 

Help is appreciated.

 

Below you find the calling snipps:

 

[snip]

 

#

## Check for valid session variable

# 

session_start();

require("../../scripts/generic/major.class.php");

$gsql = new sql;

if ($_SESSION['uid'])

{

…

 

#

## open the window with js

#
… onclick="openwin('update','<?php echo $tid;?>','<?echo
session_id();?>','<?php echo $uid;?>','430','480','cwin','no','no')" />

function openwin(type,id,sess,uid,h,w,win,loc,scrl){
 
window.open("xtemp/"+type+".php?sesi="+sess+"&id="+id+"&uid="+uid+"",win,"height="+h+",width="+w+",left=0,top=0,alwaysRaised=yes,directories=no,dependent=yes,location="+loc+",status=no,titlebar=no,resizable=no,menubar=no,scrollbars="+scrl+"");

}

 

 

Thomas

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++

Jetzt ein- oder umsteigen und USB-Speicheruhr als Prämie sichern!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to