Whenever i open the page i receive following errors:
[04-Jul-2012 17:10:45] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/test/public_html/admin/header.php:39) in /home/test/public_html/admin/edAgent.php on line 80
[04-Jul-2012 17:10:55] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/test/public_html/admin/header.php:39) in /home/test/public_html/admin/edAgent.php on line 80
Pieces of code including headers:
Encoding header:
header('Content-Type: text/html; charset=utf-8');
Login redirect header:
if(!isset($_SESSION["login"])OR $_SESSION["login"]!=1){
header('Location: login.php');
exit;
}
Checks if logged user has privileges to edit:
if($level!='4') {
header('Location: acd.php?msg=1');
exit;
}
Checks if ID exists:
if ($nUsers==0) {
header('Location: acd.php?msg=2');
exit;
}
Checks if information is editable:
if($access != '4') {
header('Location: acd.php?msg=1');
exit;
}