HTML form handling
| From: | Chris Baxter | Date: | Sun, 24 Aug 2003 10:02:27 +0000 |
| Subject: | HTML form handling | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-160573@lists.php.net to get a copy of this message | ||
Hi,
I am trying to send the results of a form to my email account and am having
difficulty carrying the form variable through if I use an html mime type.
Basically, if I send the form using a plain text format, the form results
are sucessfully copied to the email, however, if I change to mime type to
HTML (becuase I want to include a company logo and make the form a little
easier to read by using tabulation and bold text), I only seem to get the
HTML, not the php variables that carry the from info.
Below is an example of the script for the body of the email, which I am then
sending using the mail() function:
$body = <html>
<body>
<table width="85%" border="0" align="center">
<tr>
<td width=50%>Applicant 1 Forename:</td>
<td> <? $App_1_Forename; ?></td>
</tr>
<tr>
<td>Applicant 1 Surname:</td>
<td> <? $App_1_Surname; ?></td>
</tr>
<tr>
<td>Applicant 2 Forename:</td>
<td> <? echo $App_2_Forename; ?></td>
</tr>
<tr>
<td>Applicant 2 Surname: </td>
<td> <? echo $App_2_Surname; ?></td>
</tr>
</table>
</body>
</html>;
thanks in advance for any suggestions,
Chris