Skip to content

Instantly share code, notes, and snippets.

@jgmac1106
Last active February 17, 2019 13:08
Show Gist options
  • Save jgmac1106/0f444e893ef4f3d22ec8aff55ed8da32 to your computer and use it in GitHub Desktop.
Save jgmac1106/0f444e893ef4f3d22ec8aff55ed8da32 to your computer and use it in GitHub Desktop.
php email contact
<!DOCTYPE html>
<html>
<head>
<title>KEVO</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/reset.css">
<link rel="stylesheet" href="/styles.css">
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-9ralMzdK1QYsk4yBY680hmsb4/hJ98xK3w0TIaJ3ll4POWpWUYaA2bRjGGujGT8w" crossorigin="anonymous">
<script src="/script.js" defer></script>
<link rel="webmention" href="https://webmention.io/kevoglass.com/webmention" />
<link rel="pingback" href="https://webmention.io/kevoglass.com" />
<link rel="authorization_endpoint" href="https://indieauth.com/auth">
<link rel="token_endpoint" href="https://tokens.indieauth.com/token">
<link rel="webmention" href="https://webmention.io/kevoglass.com/webmention" />
<link rel="pingback" href="https://webmention.io/kevoglass.com/xmlrpc" />
<link href="https://fonts.googleapis.com/css?family=Shojumaru|Spicy+Rice|Unkempt|Mystery+Quest|Ribeye+Marrow" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
</head>
<body>
<header>
<a href="index.html">
<div class="leading">
<h1 class="leading-bigtext">
Kevo
</h1>
<h2 class="bigtext">
Mold Your World
</h2>
</div>
</a>
<nav>
<div class="1">
<a href="aboutme.html" class="navLinks">About</a>
</div>
<div class="2">
<a href="https://blog.kevo.glass" class="navLinks">Blog</a>
</div>
<div class="3">
<a href="Store.html" class="navLinks">Store</a>
</div>
<div class="4">
<a href="#" class="navLinks">Contact</a>
</div>
</nav>
</header>
<main>
<div class="contain">
<div class="Contactwrapper">
<div class="contacts">
<h3>Kevo's Kids</h3>
<h4>
Become a Phan!
</h4>
<ul class="h-card">
<li class="p-name">Kevo</li>
<li class="u-url" rel="me">Instagram: <a href="htttps://instagram.com/kevoglassman">@kevoglasman</a></li>
<li class="u-url" rel="me">Twitter: <a href="htttps://twitter.comcom/kevoglassman">@kevoglasman</a></li>
<li class="u-email" href="mailto:kevo@kevo.glass" rel="me">kevo@keco.glass</li>
</ul>
</div>
<div class="form">
<h3>Send us a message</h3>
<form action="mail.php" method="POST">
<p>
<label for="name">Your name</label>
<input type="text">
</p>
<p>
<label for="instagram">Instagram</label>
<input type="text">
</p>
<p>
<label for="twitter">Twitter</label>
<input type="text">
</p>
<p>
<label for="email">Email Address</label>
<input type="text">
</p>
<p>
<label for="subject">Topic</label>
<input type="text">
</p>
<p class="full-width">
<label for="text">Write your message</label>
<textarea name="" id="" cols="30" rows="7"></textarea>
</p>
<p class="full-width">
<button>Send</button>
</p>
</form>
</div>
</div>
</div>
</main>
</body>
<footer><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
</footer>
</html>
<?php $name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "jgregmcverry@gmail.com";
$subject = $_POST['subject'];
$instagram = $_POST['instagram'];
$twitter = $_POST['twitter'];
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment