title: Getting button value on click and echo it
body: <p>i am a beginner in php and my first task is to build a calculator and I am here to ask how to get a value from a button and just echo it on the same page. I am trying through method post using isset but enable to display any value on the same page. </p>
  
  <pre><code>&lt;form action="" method="POST"&gt;
  &lt;input type="button" value="0" name="zero"&gt;
  &lt;/form&gt;
  
  
  &lt;?php 
     if (isset($_POST["zero"]))
     {
  
      echo $_POST["zero"];
  }
  ?&gt;
  </code></pre>