Click to See Complete Forum and Search --> : Login loads, then it doesnt . . .


lavashark.com
10-04-2005, 03:55 PM
www.stfusa.com/news
See on the left the login loads properly?
You can browse the site the login works correctly.
Until you get to:
www.stfusa.com/gallery
The login disappears.
Also, any information that might appear their (if you had been logged in) also disappears.

Cookies seem to be mixing or something.
Anyone wanna help me tackle this thing?

-Will

Genixdeae
10-04-2005, 09:54 PM
if you're using variables when echoing the cookies then those variables might be confilicting....try renaming them to something like cook_vars_username=$_COOKIES["USERNAME"]

lavashark.com
10-04-2005, 09:58 PM
forgive me but, how might one check if they're using variables w/ cookies?

I don't suppose this helps at all:
<?
session_start();
header("Cache-control: private");

include ($shost."includes/dbInfo.php");
$database = "users";

if(!array_key_exists('username', $_SESSION)) {
$access = 1;
}
else {
$username = $_SESSION['username'];
$query = "SELECT * FROM $database WHERE username = '$username'";
$result = mysql_query($query);
$access = mysql_result($result, 0, "access");
}

if($access < $security) {
?> <META HTTP-EQUIV="Refresh" CONTENT="2;URL=<? echo $ihost; ?>pleaselogin.php"> <?
exit();
}

?>
<?php