Answer the question
In order to leave comments, you need to log in
How to pass data to php include file?
The mail.php file is the form handler. The data goes into it in the $_POST array. Based on this data, I need to generate an e-mail template which I connect with this line
$mail->msgHTML(file_get_contents('../master/simple.php'), __DIR__);
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ru">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width"/>
<style type="text/css">
img {
max-width: 100%;
margin: 0 auto;
display: block;
}
body,
.body-wrap {
width: 100% !important;
height: 100%;
background: #efefef;
-webkit-font-smoothing: antialiased;
-webkit-text-size-adjust: none;
}
a {
color: #71bc37;
text-decoration: none;
}
</style>
</head>
<body>
<table class="body-wrap">
<tr>
<td class="container">
<!-- Message start -->
<table>
<tr>
<td class="content">
<h2>Новый заказ</h2>
<p>Kielbasa venison ball tip shankle.</p>
<table>
<tr>
<td align="center">
<p>
<a href="#" class="button"><?php echo $product['name']; ?></a>
</p>
</td>
</tr>
</table>
<p>By the way, if you're wondering where you can find more of this fine meaty filler, visit <a
href="http://baconipsum.com">Bacon Ipsum</a>.</p>
<p><em>– Mr. Pen</em></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question