Weird Issue
Posted: Fri May 11, 2007 8:20 pm
feyd | Please use
This only works on some pages even though the only thing different on these pages is the content in the body. What could possible be causing this to happen? I have also noticed that sometimes the session ID is passed in the URL (which I DON'T want to happen) and other times it isn't. It is almost like the site is short circuiting. There is no pattern. It's just crazy. Help me please!!!! I have spent THREE DAYS working on this one issue!!!
RyanOD
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Ok, I know a million people ask questions about login scripts. Well, I did my research and I created my own login / PW protection system. It works great - except for ONE page.
The strange thing is, that one page has the exact same files included that all the other pages do. This leads me to believe the $_SESSION variable is not accessable from this one page.
How is this possible?
Every page has a session_start(); before the <DOCTYPE> declaration in the <head> to ensure every page has access to the $_SESSION variable. The code I use to check if a user is logged in is as follows:Code: Select all
<?php
if(isset($_SESSION['logged']) && ($_SESSION['logged'] == true)){
echo('<span class="login"><a href=' . $root . 'login/logout.php>Logout</a></span>');
}
else{
echo('<span class="login"><a href="#" onclick="$(\'#ifxElement\').BlindDown(500);return false;">Login</a></span>');
}
include("login/index.php");
?>RyanOD
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]