-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontact.php
More file actions
129 lines (114 loc) · 5.4 KB
/
contact.php
File metadata and controls
129 lines (114 loc) · 5.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php
if($_POST){
$to = '[email protected]';
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$message = $_POST['message'];
$subject = $_POST['subject'];
$header = "From: $fname <$fname> $lname <$lname>";
$honeypot = $_POST['firstname'];
if($honeypot > 1){
return;
}
else{
mail($to, $subject, $message, $header);
$success = "<p>Your message was sent. Thank you!</p>";
}
}
?>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="description" content="Check out the nearest asteroid of today! Data retrieved from NASA." />
<meta name="keywords" content="asteroid, celestial object, celestial bodies, earth, NASA, space" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="styles/styles.css" type="text/css" />
<!-- Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<title>Asteroid of the Day | Contact</title>
</head>
<body>
<div id="bg" class="contact-bg"></div>
<div id="filter"></div>
<!-- Background element -->
<ul class="nav-list">
<li>
<a id="sun" class="nav-element"><span id="bg-cap"><p>Check out the background-picture</p></span></a>
</li>
<li>
<a id="x" class="nav-element"><span><p>Click for explanation</p></span></a>
<div id="bg-expl-container">
<div id="bg-box">
<p>
<a href="https://images.nasa.gov/details-PIA18165.html" target="_blank" title="Opens in new tab">This image</a> shows the Hubble Telescope against Earth's horizon, and was taken by <a href="https://www.nasa.gov" target="_blank" title="Opens in new tab">NASA</a> in 1997.
The Hubble Telescope was launched April 24, 1990 and was the worlds first optical telescope to be in space. Since its launch date, Hubble has made more than 1.3 million observations and gone
more than 4 billion miles simply circling around Earth, and still going!
Discover more amazing facts about the Hubble Telescope <a href="https://www.nasa.gov/mission_pages/hubble/story/index.html" target="_blank" title="Opens in new tab">here</a>.
</p>
</div>
</div>
</li>
</ul>
<div id="content">
<header>
<div id="top-nav">
<div id="hamburger">
<span id="bar-1"></span>
<span id="bar-2"></span>
<span id="bar-3"></span>
</div>
</div>
<nav id="main-nav">
<ul>
<li><a id="home" class="nav-element" href="index.html"><span><p>Home</span></p></a></li>
<li><a id="mercury" class="nav-element" href="asteroid-of-the-day.html"><span><p>Today's asteroid</p></span></a></li>
<li><a id="venus" class="nav-element" href="discover.html"><span><p>Discover more approaching asteroids</p></span></a></li>
<li><a id="earth" class="nav-element" href="planetary-defense.html"><span><p>How do we defend our planet?</p></span></a></li>
<li><a id="mars" class="nav-element" href="asteroid-belt.html"><span><p>Learn more about the asteroid belt</p></span></a></li>
<li><a id="jupiter" class="nav-element" href="well-known-asteroids.html"><span><p>Asteroids visited by spacecrafts</p></span></a></li>
</ul>
</nav>
</header>
<main>
<h1>Feedback, tips, critics, issues?</h1>
<fieldset>
<legend>Please contact me!</legend>
<form method="post" action="" id="contact-form">
<!-- honeypot field -->
<input name="firstname" type="text" id="firstname" class="hide-robot"/>
<!-- honeypot field end -->
<input name="fname" id="fname" type="text" placeholder="First name" />
<input name="lname" id="lname" type="text" placeholder="Last name" />
<p id="name-error" class="hide-robot"></p>
<input name="email" id="email" type="email" placeholder="Your e-mail address" />
<p id="email-error" class="hide-robot"></p>
<input name="subject" id="subject" type="text" placeholder="Subject" />
<p id="subject-error" class="hide-robot"></p>
<textarea name="message" id="message" placeholder="What's on your mind?" ></textarea>
<p id="message-error" class="hide-robot"></p>
<input id="submit" type="submit" value="Send!" />
</form>
<?php echo $success; ?>
</fieldset>
<!-- Honey pot creds: https://arctek.co.za/simple-honeypot-for-an-html-form/ -->
</main>
<footer>
<nav id="footer-nav">
<ul>
<li><a href="about.html" title="About Asteroid of the Day">About</a></li>
<li><a href="contact.html" title="Contact me">Contact</a></li>
</ul>
<ul class="social-media">
<li><a href="https://www.facebook.com/NASA/" class="fa fa-facebook" title="Follow NASA on Facebook"></a></li>
<li><a href="https://www.instagram.com/nasa/" class="fa fa-instagram" title="Follow NASA on Instagram"></a></li>
<li><a href="https://twitter.com/nasa" class="fa fa-twitter" title="Follow NASA on Twitter"></a></li>
</ul>
</nav>
<p>© 2018 Jennurate All Rights Reserved </p>
</footer>
</div> <!-- content -->
<script src="scripts/validations.js"></script>
<script src="scripts/global.js"></script>
</body>
</html>