PHP mail script html formatting

Posted by Jimbly2 on Stack Overflow See other posts from Stack Overflow or by Jimbly2
Published on 2012-06-18T21:14:11Z Indexed on 2012/06/18 21:16 UTC
Read the original article Hit count: 164

Filed under:

someone kindly posted this code for me but it only returns in the resulting email - any ideas? Does it need a closing html tag?

$mailHeader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$formcontent ="<table border='1'>";
foreach ($_POST as $field=>$value)
{
$formcontent.="<tr>";
$formcontent .= "<td>$field:</td> <td>$value</td>";
$formcontent.="</tr>";
}
$formcontent .= '<tr><td>User-Agent: </td><td>'.$_SERVER['HTTP_USER_AGENT'].'</td>';
$formcontent ="</table>";

Thanks, JIm

© Stack Overflow or respective owner

Related posts about php