Hi,
I did a strange experiment with session variables and iframes.
In one master page, I have this code (here simplified) :
session_start(); // create the session
if (!session_is_registered('sessionStartTime')) {
$_SESSION['sessionStartTime']=time();
In the child iframed php content, I have this code:
session_start(); // retrieve existing session
Later, in both the master and the child documents, I have these lines:
echo "<h3>---".$_SERVER['HTTP_COOKIE']."---</h3>";
echo "<h4>---".$_SESSION['sessionStartTime']."---</h4>"
;
The framed content is called by a form submission, so the session exists and can be retrieved with session_start();
The returned HTTP_COOKIE variable is the same for both documents.
On the contrary to HTTP_COOKIE, ’sessionStartTime’ session variable cannot be retrieved in the framed document.
Both documents belongs to the same domain name.
Any idea why I cannot access the session variable ?
Thanks.