Well, here's the full function that's throwing the error (just replaced the real URL with a dummy one). After clicking the "Submit" button on the HTML page, I get an "Error on page" message:
<?php
$toName = '';
$subject = $_REQUEST['emailSubject'];
$fromName = $_REQUEST['custName'];
$fromAddress = $_REQUEST['emailAddressFrom'];
$videoID = $_REQUEST['videoID'];
$preroll = $_REQUEST['preroll'];
$postroll = $_REQUEST['postroll'];
$toAddress = 'orders@myurl.com';
$bodyText = stripslashes($_REQUEST['emailBody']);
$bodyTextHTML = $bodyText;
$bodyHTML;
$linkTargets = array();
$linkTargets[] = '(http://www.myurl.com)';
$linkTargets[] = '(http://myurl.com)';
$linkTargets[] = '(www.myurl.com)';
$linkTargets[] = '(myurl.com)';
$linkPre = ' <a href="http://www.myurl.com">';
$linkPost = '</a>';
$tLinkString = "";
$tLinkTarget = "";
$bodyTextHTML = ereg_replace(implode('|', $linkTargets), $linkPre . 'http://www.myurl.com' . $linkPost, $bodyTextHTML);
$bodyTextHTML = str_replace("\n", '<br />' . "\n", $bodyTextHTML);
if (strlen($fromName) && strlen($fromAddress) && strlen($videoID) && strlen($preroll) && strlen($postroll)) {
$bodyHTML = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"><link rel="stylesheet" type="text/css" href="http://www.myurl.com/pwstylemail.css"></head><body bgcolor="#ffffff" text="#000000"><div class="emailContentDIV">' . $bodyTextHTML . '</div></body></html>';
SendEmail($toName, $toAddress, $fromName, $fromAddress, $subject, $bodyText, $bodyHTML);
header('Location: http://www.myurl.com/testit.shtml');
exit;
} else {
WriteCommand("alert('All fields must contain valid data.');");
}
?>