title: Hide a form field with a specific id after submit
body: <p>I'm new here and a super noob in programming. I'm having trouble with my project. My problem is that I'd like hide the form after submit and retain the data input in it.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;?php
  $displayform = true;
  
  if (isset($_POST['trck']))
  {
      $track = addslashes(strip_tags($_POST['tracknumber']));
      $ord = $_POST['id'];
      $displayform = false;
  
      if (!$track)
          echo "Please enter your tracking number!";
      else 
      {
          mysql_query("update `orderdetails` set `trackno`='$track' where `id`='$ord'");
      }
  
      if ($row2['id']==$ord)
          echo $_POST['tracknumber'];
      }
  
      if ($displayform)
      {
  ?&gt;
  
      &lt;form method="post" action=""&gt;
          &lt;input type="text" name="tracknumber" id="tracknumber" size="30" maxlength="30" placeholder="Enter your track number here." /&gt;
  
          &lt;input type="hidden" name="id" value="&lt;?php echo $row2['id']; ?&gt;"&gt;
  
          &lt;input type="submit" name="trck" id="trck" value="Save" onclick="return confirm(\'Are you sure you want to save this tracking number?\');" /&gt;
      &lt;/form&gt;
  
      &lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;?php
      }
  }
  ?&gt;
  </code></pre>
  
  <p>This code was inside a while loop and my problem with this is that after I submit all the form is hidden. All I want is to hide the form with the specific ID on a query.</p>