After cleaning up the code, the same error is on line 31 (formerly line 43)
////////////////////////////// CODE
<?php
date_default_timezone_set('America/Los_Angeles');
// Read in the POST data
$fromName = isset($POST['name']) ? $POST['name'] : '';
$fromEmail = isset($POST['email']) ? $POST['email'] : '';
$division = isset($POST['division']) ? $POST['division'] : '';
$gamedate = isset($POST['gamedate']) ? $POST['gamedate'] : '';
$vPitchCounts = isset($POST['vPitchCounts']) ? $POST['vPitchCounts'] : '';
$hPitchCounts = isset($POST['hPitchCounts']) ? $POST['hPitchCounts'] : '';
$hTeam = isset($POST['hTeam']) ? $POST['hTeam'] : '';
$vTeam = isset($POST['vTeam']) ? $POST['vTeam'] : '';
$hTeam = stripslashes($hTeam);
$vTeam = stripslashes($vTeam);
$vPitchCounts = stripslashes($vPitchCounts);
$hPitchCounts = stripslashes($hPitchCounts);
$score = $hTeam . " " . $POST["hScore"] . " " . $vTeam . " " . $POST["vScore"];
//$score = stripslashes($score);
$subject = "BLL Score - " . $division . ": " . $score . " (" . $gamedate . ")";
// May need to split because this could be multiple emails addresses
// Set first pool manager as the reply-to address
$mail->AddReplyTo($fromEmail, $fromName);
$mail->From = $fromEmail;
$mail->FromName = $fromName;
$mail->Sender = $fromEmail;
//echo "From: " . $poolMgrEmails[0] . "\n";
// CC the appropriate people
$mail->AddAddress("me@gmail.com");
// Subject email
$mail->Subject = $subject;
//$mail->Body = "Hi,<br>This is the HTML BODY<br>"; //HTML Body
$mail->AltBody = $score;
$mail->WordWrap = 100; // set word wrap
$body = "<b>Division: </b>" . $division . "<br><b>Game Date: </b>" . $gamedate . "<br><b>Score: </b>" . $score;
$body .= "<p>";
// Only add if Pitch counts re available
if($vPitchCounts != '') {
$vPitchCounts = str_replace( "\n", "\n<br>", $vPitchCounts );
$hPitchCounts = str_replace( "\n", "\n<br>", $hPitchCounts );
$body .= "<b>Pitch Counts - " . $vTeam . "</b><br>" . $vPitchCounts;
$body .= "<p>";
$body .= "<b>Pitch Counts - " . $hTeam . "</b><br>" . $hPitchCounts;
}
$mail->MsgHTML($body);
$mail->IsHTML(true); // send as HTML
if(!$mail->Send()) {
//echo "Your score was not sent. Mailer Error: " . $mail->ErrorInfo;
header ("Location: submit_failure.html");
} else {
//echo "Your score was sent";
header ("Location: submit_success.html");
}
?>