Author Topic: Problem with signup-xtra.php - error "headers already s  (Read 1441 times)

paulbeestonuk

  • Posts: 26
    • View Profile
Problem with signup-xtra.php - error "headers already s
« on: April 24, 2007, 10:19:16 am »
Hi,
I have the following code in the file signup-xtra.php which is being used to copy the sequence number when a user moves from one list (6) to another (1):

// used to copy the sequence number when someone moves from one list to another
if($list=='1'){
 // get info from list 6 if exists
 list($cseq,$cdel)=@mysql_fetch_row(mysql_query("select cseq,cdel from $utable where email like '$email' and list = '6';"));
 if($cseq){
  // copy from list 6 to new subscriber
  mysql_query("update $utable set cseq = '$cseq', cdel = '$cdel' where uid = '$uid';");
  // set to 999 on list 6 to no longer receive follow ups on MC list
  mysql_query("update $utable set cseq = '999', cdel = '0' where email like '$email' and list = '6';");
 }
}

This code is producing the following error:

Warning: Cannot modify header information - headers already sent by (output started at
/xxx/mail/signup-xtra.php:7) in
/xxx/mail/signup.php on line 292

Help please! I've missed something in the code.
Thanks,
Paul.

DW

  • Administrator
  • Posts: 3787
    • View Profile
    • https://legacy.listmailpro.com
Problem with signup-xtra.php - error "headers already s
« Reply #1 on: April 24, 2007, 05:13:12 pm »
Hi Paul,

The error you mention is as it says - output was made where it was not expected.

This can happen one of a few ways:

1. Extra line break, space etc. before the opening <?php tag
2. Extra line break, space, etc. after the closing ?> tag.
3. Output from PHP, ie: echo "Example<br>";
4. A PHP error message, although such a message should be displayed before the header warning..

If you continue to have troubles, email me at dean@... with an exact copy of the signup-xtra.php file.

Regards
Dean Wiebe
ListMailPRO Author & Developer - Help | Support | Hosting