Code: Select all
<?php
//log out//
$_SESSION = array();
header('Location: frame.php');
?>what is wrong?
Moderator: General Moderators
Code: Select all
<?php
//log out//
$_SESSION = array();
header('Location: frame.php');
?>Code: Select all
session_write_close();Code: Select all
<?php
session_start();
$areyouin = isset($_POST['areyouin']) ? $_POST['areyouin'] : $_SESSION['areyouin'];
$user = isset($_POST['user']) ? $_POST['user'] : $_SESSION['user'];
if($areyouin != false){
...stuff...
}
?>Code: Select all
<?php
//log out//
$_SESSION = array();
session_write_close();
unset($_SESSION['user'],$_SESSION['areyouin']);
header('Location: http://penguinflash.justfree.com/frame.php');
?>Code: Select all
<html>
<head>
<title>myVIBE</title>
<body background="images/pagebkg.png">
<?php
session_start();
$areyouin = isset($_POST['areyouin']) ? $_POST['areyouin'] : $_SESSION['areyouin'];
$user = isset($_POST['user']) ? $_POST['user'] : $_SESSION['user'];
if($areyouin != false){
?>
<iframe name="theframe" width=395 height=430 border=0 frameborder=0 src="http://penguinflash.justfree.com/check.php" style="position: absolute; top: 53px;">
</iframe>
<a href="http://penguinflash.justfree.com/home.php" target="theframe">
<img src="images/button_home.png" style="position:absolute; top:0px; left:322px;" border=0></a>
<table style="position:absolute; top:494px; left:140px;" width=260><tr><td>
<font color=#ffffff><b><div align="right">you are logged in as
<?php
echo $user;
?>
- <a href="logout.php" target="_top"><font color=#ffffff><u>logout</u></font></a>
</div></b></font>
</td></tr></table>
<?php
}else{
?>
<iframe name="theframe" width=395 height=430 border=0 frameborder=0 src="http://penguinflash.justfree.com/check.php" style="position: absolute; top: 53px;">
</iframe>
<a href="http://penguinflash.justfree.com/login.html" target="theframe">
<img src="images/button_home.png" style="position:absolute; top:0px; left:322px;" border=0></a>
<table style="position:absolute; top:494px; left:200px;" width=200><tr><td>
<font color=#ffffff><b><div align="right">you are not logged in.</div></b></font>
</td></tr></table>
<?php
}
?>
</body>
</html>Code: Select all
unset()Code: Select all
session_destroy()Code: Select all
$_SESSION = array();Code: Select all
session_destroy()Code: Select all
<?php
//log out//
unset($_SESSION['user'],$_SESSION['areyouin']);
session_destroy();
header('Location: http://penguinflash.justfree.com/frame.php');
?>Code: Select all
// Unset all of the session variables.
$_SESSION = array();
// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (isset($_COOKIE[session_name()])) {
setcookie(session_name(), '', time()-42000, '/');
}
// Finally, destroy the session.
session_destroy();Code: Select all
if(isset($_REQUEST['logout'])=='true')
{
unset($_SESSION);
}
else
{
//this should be the statement for your login.php
}