inspire Posted September 28, 2007 Share Posted September 28, 2007 my problem is when i login to page2.php its display the session, but when i click the logout image and directed to page1.php, i can login page2.php but the session name not display.because(bcs) after i logout , i directed with page1.php with address bar http://localhost/ots/index.php?id=1,when i try login next time , the session not display page1.php <? session_start(); if(isset($HTTP_POST_VARS['name1'])) $HTTP_SESSION_VARS=$HTTP_POST_VARS['name1']; echo '<script>window.location.href="page2.php"</script>'; ?> <?php if(isset($HTTP_GET_VARS['id'])) Session_destroy(); ?> <html> <head> </head> <body> <form action="<? $PHP_SELF; ?>" method="post"> <input type="text" name="name1" > <input type="submit" value="submit" > </form> </body> </html> page2.php <?php echo $HTTP_SESSION_VARS; <a href(ignore this bcs this create link)="http://localhost/page1.php?id=1"><img src="bg/logout.png" width="60" height="20" border="0" /></a> ?> Quote Link to comment https://forums.phpfreaks.com/topic/71014-logout-fail-new-login/ Share on other sites More sharing options...
Guardian-Mage Posted September 28, 2007 Share Posted September 28, 2007 Session_destroy(), should be session_destroy(), capitals do matter Quote Link to comment https://forums.phpfreaks.com/topic/71014-logout-fail-new-login/#findComment-357096 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.