title: $_GET is working but not for $_POST for url query
body: <p>I have the following button which opens a new tab/window and redirecting to test.php page. I wanted to post the data of $a to test.php<br>
  <code>&lt;input type="button" onclick="window.open('test.php?var=&lt;?php echo $a;?&gt;','_blank');" value="test"/&gt;</code>
  <br>
  <b>test.php</b>
  <br>
  <code>$b = $_GET['var'];</code></p>
  
  <p><code>$_GET</code> in the above case will be able to retrieve the data posted from the url query, however if I change it to <code>$b = $_POST['var'];</code> I get undefined index error for var.
  <p>I read from other <a href="https://stackoverflow.com/a/3477374/6385066">posts</a> that I should not use GET for submission of sensitive data. So my question is: How can I modify the code such that I can post the data of variable <code>var</code> to test.php using <code>$_POST</code>?</p>