You can't have any text output to the browser before a redirect.  Make sure
you have nothing abouve line 58 echoing out text (specifically whatever is
in line 2, judging by your error) .. I believe I've had the problem when
I've included a file where the 1st line was blank, so you may want to check
that as well..

Chad

-----Original Message-----
From: Doug Coning [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 12:25 PM
To: php general
Subject: [PHP] Warning?


Hi everyone,

I'm using Dreamweaver to create an insert page and after the record is
inserted I receive this error:

Warning: Cannot add header information - headers already sent by (output
started at
/home/virtual/site8/fst/var/www/html/admin_gs/products_insert.php:2) in
/home/virtual/site8/fst/var/www/html/admin_gs/products_insert.php on line 62

Line 58 - 62 is as follows:

  if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $HTTP_SERVER_VARS['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));

This same code works in my update page without an error.

If you can help, thank you!!!!

Doug




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to