Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Warning: Cannot modify header information - headers already sent
#1
first off, i'm not sure if this is the correct subforum to submit this problem; apologies if it isn't.

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 Smile
Reply


Messages In This Thread
Warning: Cannot modify header information - headers already sent - by designavenger - 02-15-2010, 07:29 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Change warning level color with php [help] KingOfHunt3rs 0 1,107 12-04-2014, 08:45 AM
Last Post: KingOfHunt3rs
  [TUT] How to make, and call headers and footers. Extasey 0 677 05-12-2010, 10:42 PM
Last Post: Extasey

Forum Jump:


Users browsing this thread: 2 Guest(s)