<?php
if ($_POST['submit']) {
/* Set e-mail recipient */
$myemail = "peter@summitdaymedia.com";
/* Check all form inputs using check_input function */
$fname = check_input($_POST['fname']);
$lname = check_input($_POST['lname']);
$email = check_input($_POST['email']);
$phone = check_input($_POST['phone']);
$comments = check_input($_POST['comments']);
$subject = "Contact Form Mail";
/* If e-mail is not valid show error message */
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
{
show_error("E-mail address not valid");
}
/* Let's prepare the message for the e-mail */
$message = "Hello!
Your contact form has been submitted by:
First Name: $fname
Last Name: $lname
E-mail: $email
Phone: $phone
Comments:
$comments
End of message
";
/* Send the message using mail() function */
mail($myemail, $subject, $message);
/* Functions we used */
function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
}
function show_error($myError)
{
echo '<b>Please correct the following error:</b><br />';
echo $myError;
}
/* Redirect visitor to the thank you page */
header('Location: index.html');
exit();
}
else {
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="digital, media, film, movie, preservation, home movies, archives, consulting, consultant, summit, day, photo" />
<meta name="description" content="Business focused on moving image preservation" />
<meta name="copyright" content="copyright 2006-2012 SummitDay Media" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="icon" href="images/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<title>SummitDay Media - Contact Us</title>
<link rel="stylesheet" type="text/css" media="screen" href="styles.css" />
</head>
<body>
<div id="gradient">
<div id="container"> <!-- container start -->
<div id="header"> <!-- header start -->
<img src="images/web-banner.png" alt="Summit Day Media Banner" />
</div> <!-- header stop -->
<div id="sidebar"> <!-- sidebar start -->
<div id="navcontainer"> <!-- nav start -->
<ul>
<li><a href="index.html" rel="self" class="link1" >Home</a></li>
<li><a href="aboutUs.html" rel="self" class="link2" >About Us</a></li>
<li><a href="contact.html" rel="self" class="link3" >Contact Us</a></li>
<li><a href="services.html" rel="self" class="link4" >Preservation Services</a></li>
<li><a href="beyond.html" rel="self" class="link5" >Beyond Preservation</a></li>
<li><a href="format.html" rel="self" class="link6" >Format Guide</a></li>
<li><a href="amia.html" rel="self" class="link7" >AMIA</a></li>
<li><a href="login.html" rel="external" class="link8">Client Log-In</a></li>
</ul>
</div> <!-- nav stop -->
<div id="sidebarLogo">
<img src="images/contactLogo.png" alt="contact logo" />
</div>
</div> <!-- sidebar stop -->
<div id="contents"> <!-- contents start -->
<div class="textContent"> <!-- textContent start -->
<h2>Staff</h2>
<p class="blurb"><span class="boldText">Bob Curtis-Johnson</span> - Senior Consultant
<br /><br />
<span class="boldText">Peter Sheffer</span> - Preservation Technician
<br /><br />
<span class="boldText">Jeffrey Sinnott</span> - Photo and Document Archivist
<br /><br />
<span class="boldText">Makenzie Curtis-Johnson</span> - Archival Assistant
<br /><br />
<span class="boldText">Bonnie Curtis</span> - Bookkeeper</p>
<br />
<hr>
<br />
<div id="stylized" class="myform"> <!-- form start -->
<form id="form" name="form" method="POST" action="<?php $PHP_SELF ?>">
<h3 class="heading">Contact Form</h3>
<p>Tell us about your preservation needs.</p>
<label>First Name</label>
<input type="text" name="fname" id="fname" />
<label>Last Name</label>
<input type="text" name="lname" id="lname" />
<label>Email</label>
<input type="text" name="email" id="email" />
<label>Phone</label>
<input type="text" name="phone" id="phone" />
<label>Comments</label>
<input type="text" name="comments" id="comments" />
<button type="submit" name="submit">Contact Us!</button>
<div class="spacer"></div>
</form>
</div> <!-- form stop -->
</div> <!-- textContent stop -->
</div> <!-- contents stop -->
<div id="footer"> <!-- footer start -->
<br />
<p id="footNav">
<a href="index.html">Home</a> |
<a href="aboutus.html">About Us</a> |
<a href="contact.html">Contact</a> |
<a href="services.html">Services</a> |
<a href="beyond.html">Beyond</a> |
<a href="format.html">Format Guide</a> |
<a href="login.html">Client Login</a>
</p>
<br />
<p>© 2006-2012 SummitDay Media. All rights reserved.</p>
</div> <!-- footer stop -->
</div> <!-- container stop -->
</div> <!-- gradient stop -->
</body>
</html>
<?php } ?>