<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>The Cambridge House</title>
    <link href="cambridge.css" rel="stylesheet">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Arima">
    <link rel="icon" type="image/x-icon" href="images/houselogo.png">

    <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>
<nav id="navbar">
        <img src="images/houselogo.png">
        <p class="navitem"><a href="home.html">Home</a></p>
        <p class="navitem"><a href="roomsandacc.html">Rooms and Accomodations</a></p>
        <p class="navitem"><a href="attractions.html">Attractions</a></p>
        <p class="navitem"><a href="policies.html">Policies & Info</a></p>
        <p class="navitem"><a href="contact.html">Contact Us</a></p>
    </nav>
    <p id="thankyou">Thank you for contacting us!</p>
    <footer>
        <p>© 2024 Miranda Monzo</p>
    </footer>
</body>
</html>