Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Build a Simple PHP Application Adding a Contact Form Creating Input Fields

Nicholas Lee
Nicholas Lee
12,474 Points

I have the html element 'label' but it does not send me to the box when I click on name. Also a large greybox as footer?

<?php 
$pageTitle = "Contact Mike";
$section = "contact";
include('inc/header.php'); ?>

    <div class="section page">

        <!--<div class="wrapper">-->

            <h1>Contact</h1>

            <p> I&rsquo;d love to hear from you! Complete the form to send me an email.</p>

            <form method ="post">

                <label for ="name">Name</label> <input type="text" name="name">

            </form> 

        </div>  

    </div>

<?php include('inc/footer.php'); ?> 

I have thee code that the instructor wrote. But when I go to click on "name" to the left of the label element it does not send me ego the text box. Do I have a bug?

I'm also having a problem where my footer is about 20% above about footer grey footer. When I delete the <div class="wrapper"> code it gets rid of the two grey footers and keep the one that as the Facebook and twitter link. Else, I have two big blocks of grey.

1 Answer

Stone Preston
Stone Preston
42,016 Points

try adding an id with a value of "name" to the input

<label for ="name">Name</label> <input type="text" name="name" id="name">