Jump to content

Cannot modify header information - headers already sent


soumadri

Recommended Posts

i have two files

  1. access_user_class.php - for login management

  2. login.php - for login GUI (which includes my gui template from another file)

 

The include sequence in login.php is

      1> access_user_class.php

      2> template1_wobar.php

 

eg.

include("$_SERVER[DOCUMENT_ROOT]/includes/stripgpcslash.inc.php");

include("$_SERVER[DOCUMENT_ROOT]/classes/access_user/access_user_class.php");

include("$_SERVER[DOCUMENT_ROOT]/includes/validate_email.inc.php");

include("$_SERVER[DOCUMENT_ROOT]/includes/injection_attack.inc.php");

include("$_SERVER[DOCUMENT_ROOT]/includes/cleanvar.inc.php");

include("$_SERVER[DOCUMENT_ROOT]/template1_wobar.php");

 

 

 

now when login is successful i call a function from access_user_class.php, which inturn sets the http header location: to my home page.

e.g.

if ($goto_page) {

header("Location: ".$next_page);

exit;

}

here i am getting the following warning, bcoz of which my home page is not rendering

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\template1_wobar.php:8) in C:\wamp\www\classes\access_user\access_user_class.php on line 111

 

 

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.