title: How to pass id from another page in php?
body: <p>please help me with this project, I have a form from a page </p>
  
  <pre><code>&lt;form method="post" action="../download_form138.php" &gt;
  &lt;input type="submit" name="download" value="download" id="&lt;?php echo $row["id"]; ?&gt;" class="btn-xs" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and here is a piece of my download_form138.php</p>
  
  <pre><code>// CREATE A NEW SPREADSHEET + POPULATE DATA
  $sheet = $spreadsheet-&gt;getActiveSheet();
  $sheet-&gt;setTitle('Form 138');
  $stmt = $pdo-&gt;prepare("SELECT  * FROM q1 INNER JOIN sf1 ON q1.id = sf1.id WHERE q1.id = '".$_POST["download"]."' ");
  $stmt-&gt;execute();
  </code></pre>
  
  <p>it does not download the data from the data base but when i change the 
  <code>WHERE q1.id = '".$_POST["download"]."'</code> into <code>WHERE q1.id = 5</code>, it downloads the data with the same id in my database, What i want to do is that when a user click download, it downloads the data from the database with the same id. </p>