Ok, 1/2 way there!!
That brings up exactly the window I need. only problem is, it brings it up all the time regardless of whether the browser is set to accept cookies or not. Can't figure out why though.
Another problem, I'm using $_SESSION as you can see in the code above which is defined in the index.php page (shown in my first post) but even setting session.use_trans_sid = 1, the SESSION variable for login is not being moved from the login page. The user is validated using the following script:
<?php
include("common.php");
if(!($link_id = mysql_connect($Host, $User, $Pass)))
{
die(mysql_error());
}
mysql_select_db($DB);
$sql = "SELECT ID FROM " . $Table . " WHERE username='" . $_POST['username'] . "' AND password='" . md5($_POST['password']) . "' LIMIT 1";
if(!($result = mysql_query($sql)))
{
die(mysql_error());
}
if(mysql_num_rows($result) == 1)
{
$_SESSION['entered_username'] = $_POST['username'];
$_SESSION['login'] = 'yes';
header('refresh: 3; url=member.php');
echo "<h2><center>You have been validated. Please wait, logging you in. . .</h2><br>
<center>If your browser doesn't support redirection and you're still here in 3 seconds, <a href='members.php'>click here</a></center>";
}
else
{
header('refresh: 5; url=index.php');
echo "<b><u><center>Login failure </b></u><br>Username/Password mismatch. Sit tight, we're sending you back to the login page in 5 seconds.<br>
If your browser doesn't support redirection and you're still here in 5 seconds, <a href='index.php'>click here</a></center>";
}
?>
and then killed off with this script that runs at the start of the member.php page which checks if the user has logged in.
<?php
include("common.php");
if(!($link_id = mysql_connect($Host, $User, $Pass)))
{
die(mysql_error());
}
mysql_select_db($DB);
if (@$_SESSION['login'] != 'yes')
{
echo "<b><u><center>You haven't logged on!</b></u><p>
<a href='index.php'>Click Here</a> to return to the login page";
exit();
}
The login process is clearly taking place and the user is being validated but the $_SESSION['login'], although being set to "yes" in the login.php page is not being carried over to the member.php page.
Any ideas?