-3

Possible Duplicate:
Headers already sent by PHP

i know this is a very common problem and I have googled alot for this but still no success. I am getting this error

Warning: Cannot modify header information - headers already sent by (output started at G:\xampp\htdocs\bidding_site\inc\header.php:88) in G:\xampp\htdocs\bidding_site\inc\add_project.php on line 8

I have checked that there is no white space before the header(). below is my code of add_project.php

<?php

if(isset($_SESSION['user'])) {
echo "hello world";
}
else {

header('location:../index.php');
}
?>
Community
  • 1
  • 1
baig772
  • 3,404
  • 11
  • 48
  • 93

1 Answers1

0

The error message has already explained what has happened; inc\header.php sent some output (e.g. with echo, print or by something outside the PHP tags) on line 88.

That said, this is an extremely common problem, there are other answers here on SO and googling shows plenty of answers, so this should be closed.

El Yobo
  • 14,823
  • 5
  • 60
  • 78