I keep getting this error when ever i edit an email template.
Parse error: parse error, unexpected T_STRING in /home/premiert/public_html/lib/mail.lib(16) : eval()'d code on line 5. It's not making sence. But if i replace the template with the orignal its fine. I can edit it off line or online ot doesn't matter i get same error.
<?
function MsgFromTpl($to,$subj,$tpl)
{
global $lname, $email, $fname, $login, $ip, $pswd, $link, $ADMIN_MAIL, $url, $campaingname, $memberemail, $membername;
/* message */
$h = fopen("$tpl","r");
if(!$h) return;
$msg = "";
while(!feof($h))
$msg .= fgetc($h);
fclose($h);
ereg_replace("\"","'",$msg);
eval("\$msg=\"$msg\";");
/* To send HTML mail, you can set the Content-type header. */
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* additional headers */
$headers .= "From: $ADMIN_MAIL\r\n";
/* and now mail it */
mail($to, $subj , $msg, $headers);
}
?>