title: When I try to send id value of row via POST to another page, this page will always GET id value 1
body: <p>I started learning webdeveloping and i tried to send "id" of one of the rows generated from database to another page. The rows are clickable thanks to the javascript code, so i can choose whichever row i want. The problem is, that even though the POST method seems right:</p>
  
  <pre><code>&lt;form id="send" method="POST" action=&lt;?php echo "secondpage.php?id=". $row['id']; ?&gt; &gt;&lt;/form&gt;   
  </code></pre>
  
  <p>// In inspect of the main page it gets the value.</p>
  
  <p>However
  second page always receive id value of 1. Doesn't matter if i click on the row with id=18 or any other. It will always recieve value of 1... </p>
  
  <p>I heard that this could be a problem with javascript code which i put under PHP code.</p>
  
  <p>Here is a code with PHP:</p>
  
  <pre><code>&lt;div id="content"&gt;
  &lt;table id="usersTable" class="table table-bordered table-hover table-sm "&gt;
  &lt;form action=http://localhost/dodawanie.php&gt;
  
      &lt;input class="btn btn-primary" type="submit" value="Dodawanie"&gt;
  
  &lt;/form&gt;
  &lt;?php if ($result-&gt;num_rows &gt; 0) {
       while($row = $result-&gt;fetch_assoc()) {?&gt;
  
      &lt;tr&gt;         
  
          &lt;td&gt;&lt;?php echo "id: ". $row['id']; ?&gt; &lt;/td&gt; 
      &lt;td&gt;&lt;?php echo "Name: ". $row["first_name"]; ?&gt; &lt;/td&gt; 
          &lt;td&gt;&lt;?php echo "Last: ". $row["last_name"];?&gt;  &lt;/td&gt;
      &lt;form id="send" method="POST" action=&lt;?php echo "secondpage.php?id=". $row['id']; ?&gt; &gt;
  &lt;/form&gt; 
      &lt;/tr&gt;
  
     &lt;?php }
  } else {
       echo "0 results";
  }
  
  $conn-&gt;close();
     ?&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is javascript:</p>
  
  <pre><code>&lt;script type = "text/javascript"&gt;
  $(document).ready(function(){
      $('#usersTable').find('tr').click( function(){
      //  alert('You clicked row ' + ($(this).index()+1) );
              $('#send').submit();
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I would gladly accept any help to find an error here.</p>