i want to generate a new session_id() when i open a new page....
i know a session_id() is create when we use session_start() at the beginning of the page, and when we click on a popup window, that window will use the same session_id() untill all window is close....
Currently i use session_regenerate_id() to generate a new session_id(), example: old session_id = 99999 then after generate new session_id become 33333.
But the new session_id only use on the current page when i open up a popup window, the session_id() become the old session_id() which is what i dont want.
can anyone help me solve this problem?? i want to use the new generate session_id() on the new open window rather that the old session_id().
Thanks.
Here is my code:
Code: Select all
<?php
session_start();
$old_sessionid = session_id();
session_regenerate_id();
$new_sessionid = session_id();
echo "Old Session: $old_sessionid<br />";
echo "New Session: $new_sessionid<br />";
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta name="generator" content="Adobe GoLive">
<title>GAM Login Page</title>
</head>
<body bgcolor="#ffffff">
<br>Request Page
<p>
<a href="MultipleLoginTest.php" onClick="window.open(‘Test.php’);"> go</a>
</body>
</html>