Re: "Warning:Cannot modify header information -" Error

From: Date: Tue, 15 Jul 2008 22:42:23 +0000
Subject: Re: "Warning:Cannot modify header information -" Error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-276889@lists.php.net to get a copy of this message
On Tue, Jul 15, 2008 at 11:51 AM, Tiji varghese <tijivarghese@yahoo.co.in> wrote: > Hi All ! > I am having some problem with the code below. Everytime I run it it gives me the following > error: > Warning: Cannot modify header information - headers already sent > by (output started at > C:\xampp\htdocs\practice.com\displayUserData.php:7) in > C:\xampp\htdocs\practice.com\displayUserData.php on line 12 This message means that something was sent before line 12. In your case, the HTML. All things that have to do with headers must be before ANYTHING is sent to the browser. If you need to have the HTML before a setcookie(), header(), or another header-based PHP action, check into ob_start() and the other output-buffering functions PHP has available. -- </Daniel P. Brown> Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract! Dedicated servers, VPS, and hosting from $2.50/mo.

« previous php.general (#276889) next »