using php in html template

2 posts / 0 new
Last post
#1 Thu, 30 Apr 2015 15:43
Anonymous (not verified)

using php in html template

Is it possible to use php in a html template. I want the fax to be variable in length depending on the content that needs to be faxed. Currently I have this but is just ignores the php code:

<html>
<head>
<style type="text/css">
body, p, table, tr, td, th { font-family: 'Garamond'; }
</style>
</head>
<body>

<?php
if (false) {
?>

<h1>Fax Message</h1>
<table width="100%" cellspacing = "0" cellpadding = "5" border = "0">
<tr>
<td width = "5%"><strong>To:</strong></td>
<td>{name}</td>
</tr>
<tr>
<td width = "5%"><strong>Fax:</strong></td>
<td>{faxnumber}</td>
</tr>
<tr>
<td colspan = "2"><strong>Message:</strong><hr></td>
</tr>
<tr>
<td colspan = "2">{message}</td>
</tr>
</table>

<?php
} else {
?>

<h1>Test</h1>

<?php
}
?>

</body>
</html>

Thanks!

Mon, 4 May 2015 15:39
Eyal N

Hello Ricardo,
Yes - you should be able to send PHP content in HTML files through InterFAX. However, when using your file, the PHP code has no change to the behavior of the HTML page.
I would recommend to resolve the HTML and PHP code prior to submitting the fax to InterFAX and then it should work.

Log in or register to post comments

Contact us today

Talk to a member of our team about the benefits InterFAX can bring to your organization's communications processes.

Contact us today