I'm sure theres been dozen's of newbie's posting kindergarden threads on how to make a session username/login with php...I on the other hand know about sessions and logging in :-) i would consider my knowledge of php/msql intermediate (with oop being advanced).
My problem:
I have a login that sets a $_SESSION variable
Then i have a main page: index.php which contains an iframe that loads the application content. The index.php page should not change during user access and is only there for the links to navigate the site which load in the iframe. in every page that loads in the iframe i have this code at the top of each page:PHP Code:$_SESSION['id']=$user['id'];
This script works, however, it will randomly take me to the login.php page as if $_SESSION['id'] is not set?!PHP Code:session_start();
if(!isset($_SESSION['id']){
header('Location: http://www.calsecurity.com/login.php');
}
First, I would like any insight on why this is happening, i have a hunch theres something to do with IE and the iframe. I would also appreciate any input on possible ways to remedy my situatiion. I AM using session.cookie, cPanel w/ hostgator.com.
Thanks all!
Ive found this but do not entirely understand why IE6 and above silently block the session.cookie...
http://www.phpfreaks.com/forums/inde...topic=157539.0



Reply With Quote


Bookmarks