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!

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


why we create extra <tr> with display none

     $name = trim(filter_input(INPUT_POST,"name",FILTER_SANITIZE_STRING));
     $email = trim(filter_input(INPUT_POST,"email",FILTER_SANITIZE_EMAIL));
     $details = trim(filter_input(INPUT_POST,"details",FILTER_SANITIZE_SPECIAL_CHARS));
     echo "<pre>";
     if($name == "" || $email == "" || $details == ""){
          echo "Please fill input correctly";
     if($post["address"]!= ""){
      echo "Bad input";
     $mail_info = "";
     $mail_info .="Name : ". $name . "\n";
     $mail_info .= "Email : ".$email. "\n";
     $mail_info .= "Details : ".$details. "\n";
     echo $mail_info;
     echo "</pre>";

     //sending mail 
$p_title = "Want to Suggest";
$sections = "suggest";
<div class="section page">

  <?php if(isset($_GET["status"])&& $_GET["status"]=="thanks"){
     echo "<p>Thank You for sharing suggestions...</p>";
  } else { ?>
    <h1>Give your suggestions</h1>
  <p>If you think I missed anything here,send me mail</p>
    <form action="suggest.php" method="post">
              <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>
             <tr style="display:none"> //why we using this with display:none
              <th><label for="address">Address</label></th>
              <td><input type="text" id="address" name="address"></td>

        <input type="submit" value="send">
<?php } ?>
<?php include("include/footer.php");?>

1 Answer

none: This value causes an element to not appear in the document. It has no effect on layout.

Source: https://www.w3.org/wiki/CSS/Properties/display

Seems the address should be hidden

i want to know why we set that <tr> tag property to display:none; what was the reason behind that ?