0

I have a self submitting form that also redirects to the same page using header("Location: http://tapmichiana.org/immigration-reform.php");exit;

I get this error when i run the script Warning: Cannot modify header information - headers already sent by (output started at /home/tapm777/public_html/includes/header.php:5) in /home/tapm777/public_html/immigration-reform.php on line 31

header.php line 5 is <title><?php echo @$title; ?></title>

while

immigration-reform.php line 31 is header("Location: http://tapmichiana.org/immigration-reform.php");

please where am I getting it wrong ? Thanks.

user1843335
  • 43
  • 3
  • 13
  • 7
    You can't output a header after having output HTML. – Pekka Feb 06 '13 at 10:58
  • 1
    **PLEASE LOOK AT THE RIGHT `RELATED` COLUMN. THANK YOU** (I've bolded and capsed it intentionally - as long as you couldn't see the similar topics when composed question and don't see the right column with similar questions - there is a chance you won't notice my comment as well) – zerkms Feb 06 '13 at 10:59
  • Check for any `echo` before `header(...)` – Hary Feb 06 '13 at 11:00
  • @don When I try the same script in localhost, it works without any error. – user1843335 Feb 06 '13 at 11:21

0 Answers0