<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Amy Wah</title>
	<meta name="description" content="Amy Wah - Front-End Web Developer Portfolio">
	<meta name="author" content="Amy Wah">
	<link rel="icon" type="image/png" href="images/logo.png" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" href="fonts/webfonts.css">
	<link href='//fonts.googleapis.com/css?family=Raleway:400,300,600%7CLato:400,300,100,700,900' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="./public/styles/ionicons.min.css">
	<link rel="stylesheet" href="./public/styles/styles.css">
</head>
<body>
	<?php 
	$sucess="";
	if ($_SERVER["REQUEST_METHOD"] == "POST") {
	$name = $_POST['name'];
	$email = $_POST['email'];
	$message = $_POST['message'];
	$formcontent="From: $name \n Message: $message";
	$recipient = "amyspod@gmail.com";
	$subject = "Contact Form";
	$mailheader = "From: $email \r\n";
	mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
	$sucess="Thank you for your email!";
	}
	?>
	<header>
		<nav class="desktopNav">
		<ul>
			<li><a href="index.html" class="active">Home</a></li>
			<li><a href="about.html" class="active">About Me</a></li>
			<li><a href="contact.php" class="active">Say Hello</a></li>
		</ul>
		</nav>
		<nav class="mobileNav">
			<div class="mobileButton">
				<div class="ion-navicon-round"></div>
				<ul class="mobileMenu">
					<li><a href="index.html" class="active">Home</a></li>
					<li><a href="about.html" class="active">About Me</a></li>
					<li><a href="contact.php" class="active">Say Hello</a></li>
				</ul>
			</div>
		</nav>
	</header>
	<main>
		<aside>
			<div class="logo">
				<a href="index.html"><img src="images/logo.png" alt=""></a>
			</div>
			<ul>
				<li><a href="https://twitter.com/AmyScript_" target="newwindow"><span class="ion-social-twitter"></span></a></li>
				<li><a href="https://github.com/AmyScript" target="newwindow"><span class="ion-social-github"></span></a></li>
			</ul>
		</aside>
		<section class="titles">
			<div class="container">
				<div class="leftContainer">
					
					<h1 class="font2bold">Say Hello! </h1>
					
				</div>
				<div class="rightContainer">
					<h3 class="font2light">EMAIL ME AT: <a href="mailto:amyspod@gmail.com"> amyspod@gmail.com</a></h3>
				</div>
			</div>
		</section>
		
		<section class="contactForm">
			<form method="POST" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>">
			 
			  <input type="text" name="name" placeholder="Your Name" required><br><br>
			
			  <input type="email" name="email" placeholder="Your Email" required><br><br>
		
			  <textarea name="message" cols="40" rows="5" placeholder="Your Message" required></textarea><br><br>
			  <button type="submit">SEND MESSAGE</button><h3 class="font2bold"><?php echo $sucess; ?></h3>
			</form>
		</section>
		
	</main>
	<footer>
		<div class="leftFooter">
			<div class="mobileView">
				<ul>
					<li><a href="https://twitter.com/AmyScript_" target="newwindow"><span class="ion-social-twitter"></span></a></li>
					<li><a href="https://github.com/AmyScript" target="newwindow"><span class="ion-social-github"></span></a></li>
				</ul>
			</div>
		</div>
		<div class="rightFooter">
			<h3 class="font2">&copy;</h3>
			<h6 class="font1">2017 Amy Wah</h6>
			<br>
			<h6 class="font1"><a href="mailto:amyspod@gmail.com">amyspod@gmail.com</a></h6>
			<br>
			<h6 class="font1">logo created by Rockicon from the Noun Project</h6>
		</div>


	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
	<script src="public/scripts/main.js"></script>
</body>
</html>