this is the code to my contacts page. Maybe i screwed it all up.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Contacts</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" media="screen" href="css/reset.css">
<link rel="stylesheet" type="text/css" media="screen" href="css/style.css">
<link href='http://fonts.googleapis.com/css?family=Cabin+Sketch:400,700' rel='stylesheet' type='text/css'>
<script src="js/jquery-1.7.min.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<!--[if lt IE 8]>
<div style=' clear: both; text-align:center; position: relative;'>
<a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
<img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
</a>
</div>
<![endif]-->
<!--[if lt IE 9]>
<script type="text/javascript" src="js/html5.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="css/ie.css">
<![endif]-->
</head>
<body>
<!--==============================header=================================-->
<div class="header">
<div>
<div class="subpages-nav">
<nav>
<ul class="menu">
<li class="li-none"><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="portfolio.html">Portfolio</a></li>
<li class="li-left li-none"><a href="services.html">Services</a></li>
<li><a href="news.html">News</a></li>
<li class="current"><a href="contacts.html">Contacts</a></li>
</ul>
<h1><a href="index.html"><img src="images/logo.png" alt=""></a></h1>
</nav>
</div>
</div>
</div>
<!--==============================content================================-->
<section id="content"><div class="ic"></div>
<div class="pad-1">
<div class="page6-row1">
<div class="col-14">
<h2 class="h2">Contact info:</h2>
<dl>
<dt class="clr-1"><strong >Edward Garrity</strong><br>Miyako-Machi Isesaki-Shi Gunma-Ken</dt>
<dd><span>Telephone:</span>080-5927-9523</dd>
<dd class="p3"><span>Email:</span><a href="[email protected]" class="link">[email protected]</a></dd>
</dl>
</div>
<div class="col-15">
<h2 class="h2 p2">Location:</h2>
<div class="map img-border">
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m12!1m3!1d3214.2982175679035!2d139.1519203999994!3d36.32932161266572!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!5e0!3m2!1sen!2s!4v1400935436334" width="600" height="450" frameborder="0" style="border:0"></iframe>
</div>
</div>
<div class="col-16">
<h2 class="h2 p2">Contact form:</h2>
<form id="form" method="post" >
<fieldset>
<label><input type="text" name="sender_name" value="Full Name" onBlur="if(this.value=='') this.value='Full Name'" onFocus="if(this.value =='Full Name' ) this.value=''"></label>
<label><input type="text" name="sender_email"value="Email" onBlur="if(this.value=='') this.value='Email'" onFocus="if(this.value =='Email' ) this.value=''"></label>
<label><textarea name="sender_message" onBlur="if(this.value==''){this.value='Message'}" onFocus="if(this.value=='Message'){this.value=''}">Message</textarea></label>
<div class="btns"><a href="#" class="link-1">Clear</a><a href="index.html" class="link-1" onClick="">Send</a></div>
</fieldset>
</form>
</div>
</div>
</div>
</section>
<!--==============================footer=================================-->
<footer>
<span><strong>© 2014 EG Photo & Designs</strong><br><span>
</footer>
</body>
</html>
this is the code to my php i think i messed this totally up to.
[php]
<?php
$mail_to = '
[email protected]'; // specify your email here
// Assigning data from the $_POST array to variables
$name = $_POST['sender_name'];
$mail_from = $_POST['sender_email'];
$message = $_POST['sender_message'];
// Construct email subject
$subject = 'www.mysite.com Message from visitor ' . $name;
// Construct email body $body_message = 'From: ' . $name . "\r\n";
$body_message .= 'E-mail: ' . $mail_from . "\r\n";
$body_message .= 'Phone: ' . $phone . "\r\n";
$body_message .= 'Message: ' . $message;
// Construct email headers
$headers = 'From: ' . $mail_from . "\r\n";
$headers .= 'Reply-To: ' . $mail_from . "\r\n";
$mail_sent = mail($mail_to, $subject, $body_message, $headers);
if ($mail_sent == true){ ?>
<script language="javascript" type="text/javascript">
alert('Thank you for the message. We will contact you shortly.');
window.location = 'contact-form.html'; </script> <?php } else { ?>
<script language="javascript" type="text/javascript">
alert('Message not sent. Please, notify the site administrator [email protected]');
window.location = 'contact-form.html';
</script>
<?php
}
?>
[/php]