I have this login code in one page, login_loginuser.php :
(start_session is called way at the beginning...)
Code: Select all
if ($b_isLoginSuccess)
{
// Extract all the needed information from the database
$query_data = mysql_fetch_array($result);
$username = $query_dataї"username"];
$userid = $query_dataї"userid"];
// Register a new session
$_SESSIONї"currentuser"] = $username;
$_SESSIONї"userid"] = $userid;
// Display a message to inform the user in case the connection is tooooo slow
echo "<b>Hi $username! Please wait while E-Knowledge Hub loads...</b>";
header("refresh: 1; url=$rootDirectory/welcome.php");
exit;
}Code: Select all
session_start();
include "common_db.php";
include "common_inc.php";
include "interface_include.php";
// Begin rendering the page
htmlHeader();
renderMenuBar();
// Render the menu and welcome barrenderStatusBar();
echo "<P>Welcome to MyHub, ".$_SESSIONї"currentuser"]."</P>";
htmlFooter();Out of frustration, I remove the redirection code, so after logging in I type in the url to welcome.php myself and to my disbelief, it works! I got output buffering turned on. I also got cahce disabling on. I tried using JavaScript to redirect the page but the result is still the same.
Help me. I am cluelesss
PS. I am using MS Windows 98 with PWM. Could this be the cause of my problems?