here is one with the mailform included.
<?php
//email
if(isset($_POST['emailus'])) {
$result = "";
$name = mysql_real_escape_string($_POST['cust_name']); // required
$to_email = mysql_real_escape_string($_POST['opttwo']);// required
$from_email = mysql_real_escape_string($_POST['email']);// required
$message = mysql_real_escape_string($_POST['feedback']);// required
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = $to_email;
$email_subject = "Message from website"; //Edit this message if you want to
$email_message = "Form details below.\n\n";
$email_message .= "Name: ".$name."\n";
$email_message .= "Email: ".$from_email."\n";
$email_message .= "Comments: ".$message."\n";
// create email headers
$headers = 'From: '.$name."\r\n".
'Reply-To: '.$from_email."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
}
//send
$result = '<span class="success">Thanks for contacting us, someone will get back to you soon</span>';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
* {
margin:0;
padding:0;
border:0;
outline:0;
}
body {
font-family:Verdana, Geneva, sans-serif;
}
input {
width:375px;
display:block;
border: 1px solid #999;
height: 25px;
-webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
}
form {
background: -webkit-gradient(linear, bottom, left 175px, from(#CCCCCC), to(#EEEEEE));
background: -moz-linear-gradient(bottom, #CCCCCC, #EEEEEE 175px);
margin:auto;
position:relative;
width:550px;
height:450px;
font-size: 14px;
font-style: italic;
line-height: 24px;
font-weight: bold;
color: #09C;
text-decoration: none;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
padding:10px;
border: 1px solid #999;
border: inset 1px solid #333;
-webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
}
textarea#feedback {
width:375px;
height:150px;
}
textarea.message {
display:block;
}
.subbutton …