opening a new window counteracts my “enforce_auth”

adel86

New Member
On my social network. There are "home" links that take you to the appropriate index if you are signed in or out. There is a "index.php", that if you are browsing the site signed out, it takes you there, and if signed in, and hit "home" it takes you to "index_signedIn.php"This is working fine for me. The problem is, when I close the window, and open it back up, its on the "index.php" even if you are signed in,and can allows you to continue in a signed in manner. Someone helped me set up the init.php, and I can not see anything in there that would relate to this. If you have a idea what the problem may be, and want to help, please let me know what code you may need, if any.thanks in advancein my masthead I have these links ( and on the footer as well )\[code\]<div id="social_tag"> <?php if($auth) { ?> <a href="http://stackoverflow.com/questions/3833639/index_signedIn.php"><img src="http://stackoverflow.com/questions/3833639/styles/images/social_tag.png" border="0" /></a> <?php }else{ ?> <a href="http://stackoverflow.com/questions/3833639/index.php"><img src="http://stackoverflow.com/questions/3833639/styles/images/social_tag.png" border="0" /></a> <?php } ?></div>\[/code\]if your session times out this happens:\[code\]function enforce_auth() { global $auth; if(!$auth) { header("Location: signin.php?return=" . $_SERVER['REQUEST_URI']); exit; }}\[/code\]and this is on the pages that we don't want people to be able to go to if they are singed out, and right now it dumps you to the index (as it should,)\[code\]enforce_auth();\[/code\]just need it to take you to index_signedIn.php when the window closes and reopens and you are still signed in
 
Back
Top