Welcome to the Treehouse Community
Looking to learn something new?
Header not being included
I'm working on "Redirecting After a Form Submission" on the PHP course. I followed the video but my header doesn't seem to load.
The CSS stylesheet isn't applied to the page either so I'm assuming that somethings wrong with my include(header) code but I can't seem to find what the problem is. Here is my code.
<?php $name = $_POST["name"]; $email = $_POST["email"]; $message = $_POST["message"]; $email_body = ""; $email_body = $email_body . "Name: " . $name . "\n"; $email_body = $email_body . "Email: " . $email . "\n"; $email_body = $email_body . "Message: " . $message; // TODO: Send Email $pageTitle = "Contact Mike"; $section = "contact"; include("incude/header.php"); ?> <div class="section page"> <div class="wrapper"> <h1>Contact</h1> <p>Thanks for the email! I’ll be in touch shortly.</p> </div> </div> <?php include("include/footer.php"); ?>
The footer does show up on the page. Any suggestions?
Kevin Korte28,109 Points
Yes, you didn't spell the word "include" correctly like you did in your footer tag. You are missing the 'L'.
Pro-tip: Spelling is the first thing I check when something doesn't work as planned. I would guess 75% of time it's the reason something is broken for me. I'm not a pro.
Might be an obvious spot and sorry if it is but include is spelt wrong on your include header it says incude
Oppps kevin beat me to the spell check