ok so I have this form:
Code:
<form action="websiteurl/meadowform.php" method="post" id="form" style="margin:0; padding:0 ">
<table cellpadding="0" cellspacing="0" border="0"
<tr>
<td valign="top" width="206" eight="232">
<div style="margin:19 0 0 22px "><img src="images/5_w2.gif" alt="" border="0" style="margin-left:-9px; margin-bottom:21px "><br>
<input type="text" style=" width:182px; height:27px" value=" name:"><br><br style="line-height:1px "><input type="text" style=" width:182px; height:27px" value=" e-mail:"><br><br style="line-height:1px "><input type="text" style=" width:182px; height:27px" value=" phone:"><br><br style="line-height:1px "><input type="text" style=" width:182px; height:27px" value=" preference (email or phone):"></div>
</td>
<td valign="top" width="320" height="232">
<div style=" margin:49 0 0 0px"><textarea cols="35" rows="35" style=" width:272px; height:117px; overflow:hidden " > How we can help you:</textarea><br><br style="line-height:7px ">
<img alt="" src="images/spacer.gif" width="150px" height="1px"><a href="#" onclick="document.getElementById('form').reset()"><font color="#330000">RESET</font></a><img alt="" src="images/spacer.gif" width="28px" height="1px"><a href="index-ty.htm" onclick="document.getElementById('form').submit()"><font color="#330000">SUBMIT</font></a>
</div>
</td>
</tr>
</table>
</form>
and I've go this script named meadowform:
Code:
<?php
if(isset($_POST['submit'])){
$message = null;
foreach($_POST as $k => $v){
if($k!='submit')
$message .= "$k: $v\n\n";
}
}
mail('email@companyname.com', 'someone has contacted you from companyname.com', $message);
?>
Now I want to have the script email me (as it does now) when someone hits the submit button, however I would like to include the text fields above (name, email, phone, preference, and comments) in the email that gets sent to me.
Anyone able to help me with what needs to be included in the PHP script to capture the form data and include it in an email to mysef without posting to a DB?