<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Animal Crossing: New Horizons</title>
    <link href="style.css" rel="stylesheet">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poiret One">
    <link rel="icon" type="image/x-icon" href="images/nookipedialogo.webp">
    <script>
        function initializeMenu() {
            var menu = document.getElementById("menu");
            menu.style.display = "none";
        }

        function toggleMenu() {
            var menu = document.getElementById("menu");

            if (menu.style.display === "none") {
                menu.style.display = "block";
            } else {
                menu.style.display = "none";
            }
        }
    </script>
        <?php


$fname = $_REQUEST['firstName'];
$lname = $_REQUEST['lastName'];
$phone = $_REQUEST['phone'];
$comments = $_REQUEST['comments'];
$message = "Name: " . $fname . " " . $lname . "\nPhone: " . $phone;  

$to = "stephen.mathie@mtchs.org";
$subject = "Contact Form Request";
$from = $_REQUEST['email'];
$spamCheck = $_REQUEST['address'];

if($spamCheck) {
     die("Don't send this");
}
else {
     mail($to, $subject, $message, $from);
} 

?>

</head>
<body>
<div id="navbar">
        <img src="images/acnhlogo.png" alt="acnh logo" id="navlogo">
        <nav id="links">
            <a href="home.html" class="navlink">Home</a>
            <a href="fishbugs.html" class="navlink">Fish/Bugs</a>
            <a href="villagers.html" class="navlink">Villagers</a>
            <a href="contact.html" class="navlink">Contact</a>
        </nav>
    </div>
    <p id="thankyou">Thank you for contacting us!</p>
</body>
</html>