Jump to content

[SOLVED] cannot send headers :(


jamesxg1

Recommended Posts

<?php session_start();

ini_set('display_errors', 1);
error_reporting(E_ALL);

include 'Database/Connection.php';
include 'Database/Settings.php';

?>

<html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="CoreFiles/css/style.css" />
<title><?php print $companytitle ?> - Logout</title>
</head>
<body>

<div align="center"></div>

<?php
if (@$_GET['logout'] == 'Site') {
print "<p><div align=\"center\">You are now Logged out!<br>Returning to Login page</div></p>";

$userid = $_SESSION['userid'];
$check = sprintf("SELECT * FROM `members` WHERE userid = '$userid'"); 
$ress = mysql_query($check);
while ($check = mysql_fetch_assoc($ress)) {
$loggedin = mysql_real_escape_string($check['loggedin']);
}
if ($loggedin == 'Y') {

$login = mysql_query("UPDATE `members` SET loggedin ='N' WHERE userid = '$userid'") or die(mysql_error());

session_unset();
session_destroy();
}
header ('Location: Login.php?login=Site');

}
if (@$_GET['logout'] == 'File') {
print "<p><div align=\"center\">You are now Logged out!<br>Returning to Login page</div></p>";

session_unset($_SESSION['username']);
session_unset($_SESSION['filename']);
session_unset($_SESSION['owner']);
session_unset($_SESSION['dir']);
session_destroy($_SESSION['username']);
session_destroy($_SESSION['filename']);
session_destroy($_SESSION['owner']);
session_destroy($_SESSION['dir']);

header('Location: Login.php?login=File');
}
?>

</body>
</html>

 

 

cant send headers :(

Link to comment
https://forums.phpfreaks.com/topic/154615-solved-cannot-send-headers/
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.