Code: Select all
<?php
if (!$_GETї'id']) {
$id = md5(uniqid(rand(),1));
}
session_id($id);
session_start();
include("../../web.inc");
if ($_POSTї'u'] && $_POSTї'p']) {
session_register('u');
session_register('p');
session_register('ID');
}
createHeader("", "$user Downloads Admin", false);
createMenu();
if (session_is_registered('u')) {
// set up $ID and show users page
} else {
echo "Session - Invalid username or password. Click <a href='login.php?id=$id'>here</a> to try again.";
}Code: Select all
<?php
session_id($id);
session_start();
include("../../web.inc");
createHeader("", "Add $user Downloads", false);
createMenu();
echo "<center>\n";
if (!session_is_registered('ID')) die("Session error. Click <a href='login.php?id=$id'>here</a> to try again.");
if ($_POSTї'filename']) {
// deal with POST entry
} else {
// show form to enter data in
}Every once and a while when I just click between these two pages, it will fail my session_is_registered() test. I had it output $id and also session_id() when it failed, but they are both the same. I tried outputting the entire $HTTP_SESSION_VARS when it fails, but it is empty (has the data when it works right though).
There doesn't seem to be a pattern with how many clicks it takes, sometimes it is just one others it is many. Both pages will do it, it's not just one of them. Most times it does that, I can hit refresh a few times and it will recover it's mind and continue working. If it recovers, it will usually work fine until you close that window and open a new one. Then is does the same sort of thing. Has this happened to anyone else before? Do you have any ideas about what's going on? Thanks for the help, I appreciate it.