Hopefully this helps. You will have to change some of the information but that is a really simple form.
Code
<!--Php to send email and return message to user -->
<?php
//standard fields
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
//information to send email
$to = 'emailname@mail.name';
$subject = 'Subject line here';
$from = "From $name";
//email content
$body = "From: $name\n
Email: $email\n
Message: $message";
//variable to confirm form is valid.
$allValid = True;
//regex
$validEmail = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*"
."@[a-z0-9-]+(\.[a-z0-9-]{1,})*"
."\.([a-z]{2,}){1}$";
$validName = "([a-zA-Z]){2,}";
//if submit pressed
if ($_POST['submit']) {
//check all forms valid, false if they are not.
if(!eregi($validName,$name)){
$allValid = False;
echo 'Houston, we have a problem';
}
if(!eregi($validEmail,$email)){
$allValid = False;
echo 'Houston, we have a problem';
}
if($message == ''){
$allValid = False;
echo 'Houston, we have a problem';
}
//all valid, send the email.
if($allValid){
if (mail ($to, $subject, $body, $from)) {
echo 'Success';
$name = '';
$email = '';
$city = '';
$phone = '';
$message = '';
}
else {
echo 'Houston, we have a problem';
}
}
}
?>
<!-- end php-->
<div id="contactForm">
<form method="post" action="yourpagename.php">
<div class="row alt">
<div class="t">Name: <span class="required">*</span></div>
<div><input type="text" name="name" value="<?php echo $name; ?>"/></div>
</div>
<div class="row">
<div class="t">Email Address: <span class="required">*</span></div>
<div><input type="email" name="email" value="<?php echo $email; ?>"/></div>
</div>
<div class="row alt">
<div class="t">Message: <span class="required">*</span></div>
<div><textarea name="message"><?php echo $message; ?></textarea></div>
</div>
<div class="row">
<div class="submit"><input type="submit" id="send" name="submit" value="Send Inquiry" /></div>
</div>
</form>
</div>