I am loosing my mind!
this is what I get right above my form and under the title of the page Form Trying is the Header in the page:
Form trying
Go back'; exit(); } $body .= $field .': ' .$value .'
'; } mail($email, $subject, $body); } ?>
(then the form actually begins)
this is part of the code: what am I doing wrong???? Red is the php part
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Form try</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="mm_lodging1.css" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #336666}
.style3 {color: #FFFFFF}
.style4 {font-size: 12px}
.style7 { color: #FFFFFF;
font-size: 10px;
}
.style7 {font-size: 12}
.style8 {letter-spacing:.1em; font: 10px arial;}
-->
</style>
</head>
<body bgcolor="#3d5764">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="15" nowrap="nowrap"> </td>
<td height="60" colspan="3" nowrap="nowrap" class="logo style3">Have Your Own Assistant<br />
<span class="style6 style8">"Let my Virtual Office take the office Administration out of your office"</span><span class="style3"><span class="style7"><br/>
</span></span></td>
<td width="100%"> </td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="5"><img src="mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>
<tr bgcolor="#a4c2c2">
<td width="15" nowrap="nowrap"> </td>
<td height="36" colspan="2" id="navigation" class="navText"><span class="style1"><a href="index.html">HOME</a></span> & nbsp; <a href="What is a VA.html">WHAT IS A VA?</a> &nbs p; <a href="Why Hire a VA.html">WHY HIRE A VA?</a> <a href="What I Can Do.html">WHAT I CAN DO</a> <a href="About Me.html">ABOUT ME</a> <a href="Contact Us.html">CONTACT</a></td>
<td> </td>
<td width="100%"> </td>
</tr>
<tr bgcolor="#ffffff">
<td colspan="5"><img src="mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>
<tr bgcolor="#ffffff">
<td valign="top" width="15"><img src="mm_spacer.gif" alt="" width="15" height="1" border="0" /></td>
<td valign="top" width="140"><img src="mm_spacer.gif" alt="" width="140" height="1" border="0" /></td>
<td width="505" valign="top"><br />
<table border="0" cellspacing="0" cellpadding="2" width="440">
<tr>
<td class="pageName">Form trying</td>
</tr>
<tr>
<td class="bodyText">
<?php
if (!empty($_POST)) {
$email = 'cherishroundstream@sbcglobal. net';
$subject = 'From contact form';
$body = '';
$fields = array('Name', 'Email', 'Comments');
foreach ($fields as $field) {
$value = trim(strip_tags($_POST[$field]));
if ($value == '') {
echo $field .' can\'t be empty. <a href="javascript:history.go(-1);">Go back</a>';
exit();
}
$body .= $field .': ' .$value .'<br />';
}
mail($email, $subject, $body);
}
?>
<form id="form1" name="form1" method="post" action=""> Name:
<input type="text" name="Name" id="Name" />
<label for="Name"></label>
<br />
Email:
<input type="text" name="Email" id="Email" />
<label for="Email"></label>
<br />
Comments:
<textarea name="Comments" id="Comments"></textarea>
<label for="Comments"></label>
<p> </p>
<p>
<input type="submit" name="Submitt" id="Submitt" value="Submit" />
</p>
</form>
<p class="style4"> </p> </td>
</tr>
</table>
*<br />
<br /> </td>
<td valign="top"> </td>
<td width="100%"> </td>
</tr>
<tr>
<td width="15"> </td>
<td width="140"> </td>
<td width="505"> </td>
<td width="100"> </td>
<td width="100%"> </td>
</tr>
</table>
</body>
</html>