I have a file called course.php
<?php
session_start();
// lots of code here
?>[<a href="javascript:popup('more.php?<?php echo session_name().'='.session_id();?>');">more</a>] <br>
The popup opens fine, but it asks me to login.
Popup
<?php
// Start that session
session_start();
// validation
if($_SESSION['is_logged_in'] == false)
{
$_GET['url'] = $PHP_SELF;
include "login.php";
}else{
// page contents
}
It always seems to include login.php?url=/more.php, which is fine if the user isn't logged in.
I use the same if statement on the course.php and it works fine. I have a feeling that the session isn't passing from the main window to the popup window.
What do I have to do to fix this?
Thanks in advance for your help. I appreciate it.