02-15-2010, 07:29 AM
first off, i'm not sure if this is the correct subforum to submit this problem; apologies if it isn't.
The problem is:
admin_suite\header.php:
line 166 in delete function:
line 166 being:
I can't seem to figure out why its saying headers have already been sent? Any help would be seriously appreciated
The problem is:
Quote:Warning: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\include\php_layout\admin_suite\header.php:45) in C:\xampp\htdocs\admin\admin_webmasterqueries.php on line 166
admin_suite\header.php:
PHP Code:
include("../include/session.php");
if(!$session->isAdmin()){header("Location: ../game/index.php"); exit;}
else{ //Display everything below if user is not logged in
include("../include/php_layout/admin_suite/header.php"); //header
line 166 in delete function:
PHP Code:
//code executes if admin decides to delete query
if($id == "delete" && $status == "delete") {
//Added for furthur security measures - [Second check that user is authorised]
if(!$session->isAdmin()){header("Location: ../game/index.php");}else{
$query_id = $_GET['queryID']; //Gets the querie's ID
$q = "DELETE FROM contactwebmaster_requests WHERE wmqueryID='$query_id' LIMIT 1";
$query_delete = $database->query($q) or die("MySQL error: ".mysql_error());;
header("Location:".$session->referrer."");}
}//if ID=delete
line 166 being:
Quote:header("Location:".$session->referrer."");}
I can't seem to figure out why its saying headers have already been sent? Any help would be seriously appreciated