title: Is there a way to pass a php variable to another page using a button (html/php)?
body: <p>For example, say you have a loop that produces a button every time it loops. So if the loop ran five times, there would be 5 buttons. Now say i have a variable like $num which will change each time the loop loops. Is there a way so that each button will pass its individual $num when the button is clicked?</p>
  
  <pre><code>$num = 0;
  while(...){
      //want this to send $num via POST or GET to xyz.php
      echo '&lt;button type="submit" value="3" name="editId"&gt;Remove&lt;/button&gt;';
      $num++;//$num changes every instance of the loop
  }
  </code></pre>