Page 1 of 1

Cannot modify header information

Posted: Thu May 26, 2005 2:40 pm
by isabelle
I am trying to solve a reload (duplication) problem with my form and I've been trying to redirect to a receipt page.

But I keep getting this error:

Warning: Cannot modify header information - headers already sent by (output started at db.inc:36) in example.8-4.php on line 26

I am not familiar with headers. What can I do to solve this problem?

Posted: Thu May 26, 2005 2:42 pm
by Revan
Remove any data being sent before the headers, this includes the most common error:

Code: Select all

<?php
That new-line before the PHP tag will cause the error.

Posted: Thu May 26, 2005 2:48 pm
by John Cartwright

Posted: Thu May 26, 2005 5:30 pm
by Chris Corbyn
* yawn *

Posted: Thu May 26, 2005 5:32 pm
by shiznatix
and if your truley lazy and dont read those

Code: Select all

ob_start();
on the 1st line of the script your running. but, as fyed would say "this is a bandaid way, dont do this" but it does work

Posted: Thu May 26, 2005 9:46 pm
by John Cartwright
shiznatix wrote:and if your truley lazy and dont read those

Code: Select all

ob_start();
on the 1st line of the script your running. but, as fyed would say "this is a bandaid way, dont do this" but it does work
Stop mentioning the bandaid ;) Unrecommended.

Just kidding but you know..