PHP and HTML

I don’t know very much about PHP but a fair bit about HTML. Have done the Kirupa tutes (below), both work really well on their own. Does anyone have an idea how to get these two tutorials to work together:

PHP Contact Form ( 1, 2, 3, 4 )
HTML and PHP

Both are on the Kirupa site under PHP and XML tutorials.

I have tried to code various bit into each of the files but had no luck. Spent hours getting nowhere!!!

Does anyone have any ideas about how to combine these two tutes to get a nice looking output, say with a tables, images or horizontal rules separating the various fields for the email output that is sent?

Here is the code of the two files I have been working with:

<?php
if(isset($_POST[‘submit’])) {

$to = "[email protected]";
$subject = “Form Tutorial”;
$name_field = $_POST[‘name’];
$email_field = $_POST[‘email’];
$message = $_POST[‘message’];
$option = $_POST[‘radio’];
$dropdown = $_POST[‘drop_down’];

foreach($_POST[‘check’] as $value) {
$check_msg .= "Checked: $value
";
}

$body = "From: $name_field
E-Mail: $email_field
$check_msg Option: $option
Drop-Down: $dropdown
Message:
$message
";

echo “Data has been submitted to $to!”;
mail($to, $subject, $body);

} else {
echo “blarg!”;
}
?>

=========

and this one writes html:

<?php
print("<font size=“2” face=“Arial”>");
print("<table style=“BORDER-COLLAPSE: collapse” width=“350” border=“2”>");
print("<tr><td width=“2%” bgColor="#b7d0e3"><font size=“2”>");
print("<img src=“http://www.kirupa.com/mini_icons/robot_metal.gif”>
</font></td>");
print("<td width=“98%” bgColor="#eaf1f7"><font size=“2”> <b>Quick Summary </b>");
print("</font></td></tr><tr><td widt"100%" colSpan=“2”>");
print("<table borderColor="#111111" cellPadding=“15” border=“0”>");
print("<tr><td width=“100%”></font><font size=“2” face=“Arial”>A complicated
example involving tables and images.</font></td>");
print("</tr></table></td></tr></table>");
?>