Jump to content

logout fail new login


inspire

Recommended Posts

 

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>

?>

 

Link to comment
https://forums.phpfreaks.com/topic/71014-logout-fail-new-login/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.