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


Cliff Jackson
Cliff Jackson
2,887 Points

problem with process.php file?

When i followed the instruction on the video all i get from the process.php file is the text from the details box and no username or details any ideas?

$name = $_POST["name"];
$email = $_POST["email"];
$details = $_POST["details"];

echo $name;
echo $email;
echo $details;

$pageTitle = "Suggest a Media Item";
$section = "suggest";

include("inc/header.php"); ?>

<div class="section page">
  <div class="wrapper">
    <h1>Suggest a Media Item</h1>
  <p>If you think there is something I&rsquo;m missing, let me know! Complete the form to send me an email.</p>
    <form method ="post" action="process.php">
            <th><label for="name">Name</label></th>
            <td><input type="text" id="name" name"name"/></td>
            <th><label for="email">Email</label></th>
            <td><input type="text" id="email" name"email"/></td>
            <th><label for="details">Suggest Item Details</label></th>
            <td><textarea name="details" id="details"></textarea></td>
        <input type="submit" value="Send" />


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

Moderator edited: Markdown added so that code renders properly in the forums.

2 Answers

Jennifer Nordell
Jennifer Nordell
Treehouse Teacher

Hi there, Cliff Jackson ! I received your request for assistance and added a bit of formatting to your code so that it's a bit more readable in the forums.

Currently, I see two errors in your HTML and they contain the same sort of problem.

For the "Name" field you have this:

<td><input type="text" id="name" name"name"/></td>

But that is missing an equals sign. It should be:

<!-- Note the = between name and "name" -->
<td><input type="text" id="name" name="name"/></td>

For the email you have the same thing. That should be:

<!-- Note the equal sign between name and "email"  -->
<td><input type="text" id="email" name="email"/></td>

If correcting these doesn't fix the issue then I will need to see a snapshot of your workspace to assist you further.

Hope this helps! :sparkles:

Cliff Jackson
Cliff Jackson
2,887 Points

Great Jennifer thanks that's cured it!