<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Burger</title>
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
    <link href="style.css" rel="stylesheet">

    <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 = "mirandam.2027@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 onload="initializeMenu()">
    <nav>
        <span class="material-symbols-outlined">flutter</span>
        <span id="menuIcon" class="material-symbols-outlined"><a href="#" onclick="toggleMenu()">menu</a></span>
        <ul id="menu">
            <li><a href="index.html">Home</a><span class="material-symbols-outlined menuItem">chevron_left</span></li>
            <li><a href="Services.html">Services</a><span class="material-symbols-outlined menuItem">chevron_left</span></li>
            <li><a href="contact.php">Contact Us</a><span class="material-symbols-outlined menuItem">chevron_left</span></li>
        </ul>
    </nav>
    <p>Thank you for submitting!</p>
</body>
</html>