hi tia,
if i got you right, you want to write data from session into another.
The gap there is you will have to know the session-id from each session.
if you know them, you can accomplish the task with the following code:
<?php
// SESSION-ID of the session to write in is in $newSessId;
// Save data from current Session
session_write_close();
$oldSessId= session_id($newSessId);
// Change to new Session
session_start();
// Delete/Alter data into Session
unset($_SESSION['unsetvar']);
$_SESSION['altervar']="newvalue";
// Save changes into Session
session_write_close();
// Switch back to previous session
session_id($oldSessId);
session_start();
?>
best regards
deniz adrian
Ikke wrote:
I have to share a variable between browser sessions.
One session for example changes the variable, the other sessions must
see the changes (get the new value instead of the original value)
it's not allowed to save the value in a database or to save it into a
file. It must be a kind of global server variable, changeable by every
session.
tia