title: How to separate submit button and checkboxes in php
body: <p>I know this code will not work but can anyone teach me what can I do.</p>
  
  <pre><code>&lt;table&gt; 
  &lt;tr&gt;
  &lt;form method ="post" action ="&lt;?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?&gt;"&gt;
  &lt;th&gt;Stock&lt;/th&gt;&lt;th&gt;Value&lt;/th&gt;&lt;th&gt;&lt;input type = "submit" name="submit" value="Submit"&gt;&lt;/th&gt;
  
  &lt;/tr&gt;
  
  &lt;?php
  while($grow = mysqli_fetch_array($sqlqueresult)) :
      $gsymbol = $grow['symbol'];
      $gclose = $grow['value'];
  ?&gt;
      &lt;tr&gt;
      &lt;td style='width: 100px;'&gt;&lt;?php echo "$gsymbol"?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo "$gclose"?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type = "checkbox" name = "arrsymbols[]" value = '".$gsymbol."'&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/form&gt;
  &lt;?php endwhile; ?&gt;
  &lt;?php
  </code></pre>
  
  <p>How to make this code works? Or how should I include the submit and checkbox in one form that between them is a while statement</p>