Dreaded "cannot add header" error
I'm going around in circles. Someplace I've messed my code up and I'm getting the error:
Warning: Cannot modify header information - headers already sent by (output started at C:\Inetpub\vhosts\xxxxxxxxxxxxxxxxx.com\httpdocs\confirm.php:12) in C:\Inetpub\vhosts\xxxxxxxxxxxxxxxxx.com\httpdocs\WA_ValidationToolkit\WAVT_Scripts_PHP.php on line 66
Line 66 which of course is not where the error is:
header("Location: ". $thePostURL);
and the first part of confirm is:
<?php if (!session_id()) session_start(); ?>
<?php require_once("WA_Globals/BP_Globals.php" ); ?>
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php require_once("WA_Universal_Email/mail_PHP.php"); ?>
<?php require_once("WA_Universal_Email/MailFormatting_PHP.php"); ?>
<?php require_once("WA_SecurityAssist/Helper_PHP.php" ); ?>
<?php require_once("WA_SecurityAssist/WA_RandomPassword.php"); ?>
<?php require_once('Connections/connBP.php'); ?>
<?php require_once("WA_eCart/WA_eCart_Database_PHP.php"); //WA eCart Include ?>
<?php require_once("WA_eCart/BPeCart_PHP.php"); //WA eCart Include ?>
<?php require_once("WA_eCart/WA_eCart_USPS_PHP.php"); //WA eCart UPS Shipping Include ?>
<?php
$BPeCart->GetContent();
?>
I can make it go away if I don't validate. There are other "header()" functions in confirm.php but it's only this one in the include. There aren't any characters before the opening php tag in the validate include:
<?php
function SaveFormToSession($theErrors, $valPage) {
$postVars = "";
What am I doing wrong????