|
Posted by Wayne on 03/30/06 11:35
Hi,
I have recently added tried to update the feedback form on my
page to be sent in HTML format.
Problem is that when its submitted, I get the mail without the
variable input, just the variable name.
I have added the text version to it and both send fine, but still only
the text version includes the variable input.
HTML code taken directly from php.net example (See my form below).
Can anyone advise how I can solve this ?
--
Thanks,
Wayne
<?php
$to = 'webmaster@mydomain.com';
$subject = 'www.mydomain.com - contact';
$message = '
<html>
<head>
<title>www.mydomain.com - contact</title>
</head>
<body>
<br>
<p>Contact from www.mydomain.com</p>
<table>
<tr><td>Name</td><td>$contactname</td>
<tr><td>Email address</td><td>$contactemailaddress</td>
<tr><td>Query</td><td>$contactquery</td>
</table>
</body>
</html>
';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'To: Webmaster <webmaster@mydomain.com>' . "\r\n";
$headers .= 'From: $contactname <$contactemailaddress>' . "\r\n";
mail($to, $subject, $message, $headers);
?>
Navigation:
[Reply to this message]
|