Hello,
I'm trying to put together a newsletter based on three sections using includes. In each of the includes I have gone through and placed the escape character "\" in front of each ".
When I execute the script, it echoes the contents of the includes which I don't want and in the e-mail I receive the following:
111
It works fine when I hardcode the html in the main script with the following:
$newsletter = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
\"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<title>Hints for Homes | Newsletter</title>
<style type=\"text/css\">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif;
font-size: x-small;
}
.style6 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: x-small;
}
.
.
.
I also tried to encase the html with </php . . . ?> I received an error.
Any help would be appreciated.
Thx, gary
----following code is in the main script ----------------------
if ($month == "11") {
$newsletter = include ("newsletters/Newsletter_HTML_Header.php");
$newsletter .= include ("newsletters/Newsletter_HTML_Agent_Header.php");
$newsletter .= include ("newsletters/Newsletter_11_November_Code.php");
----contents of ------------ Newsletter_HTML_Header.php
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"
\"http://www.w3.org/TR/html4/loose.dtd\">
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<title>Hints for Homes | Newsletter</title>
<style type=\"text/css\">
<!--
.style1 {font-family: Arial, Helvetica, sans-serif;
font-size: x-small;
}
.style6 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: x-small;
}
.
.
.
------later in the main program I e-mail the client -------------------
.
.
.
$headers .= "--$boundary\r\n" . "Content-Type: text/html; charset=ISO-8859-1\r\n" . "Content-Transfer-Encoding: base64\r\n\r\n";
$headers .= chunk_split(base64_encode("$newsletter"));
//send e-mail
mail($client_email_address_search, $clientsubject, $clientbody, $headers);