title: Creating a php calculator
body: <p>This is what I have typed. For this form method I want to get the answer in the answer input field. 
  The php is not working. I can't understand what's wrong</p>
  
  <pre class="lang-php prettyprint-override"><code>  &lt;form action="index.html" method="get"&gt;
         &lt;h1&gt;Calculator&lt;/h1&gt;
         &lt;a&gt;Num 1&lt;/a&gt;&amp;nbsp;&amp;nbsp; &lt;input type="text" name="num1" value=""&gt;&lt;br&gt;&lt;br&gt;
         &lt;a&gt;Num 2&lt;/a&gt;&amp;nbsp;&amp;nbsp; &lt;input type="text" name="num2" value=""&gt;&lt;br&gt;&lt;br&gt;
         &lt;a&gt;Answer&lt;/a&gt;&amp;nbsp; &lt;input type="text" name="ans" value=""&gt;&lt;br&gt;&lt;br&gt;
         &lt;button type="button" name="add"&gt;+&lt;/button&gt;
         &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;button type="button" name="subtract"&gt;-&lt;/button&gt;
         &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;button type="button" name="multiply"&gt;*&lt;/button&gt;
         &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;button type="button" name="devide"&gt;/&lt;/button&gt;
       &lt;/form&gt;
  
  &lt;?php
  if (isset($_GET["add"]) == 'add') {
    $number1 = $_GET['num1'];
    $number2 = $_GET['num2'];
    $answer = $_GET['ans'];
  
    $_GET['ans'] = $_GET['num1'] + $_GET['num2'];
    $_GET['ans'];
   }
  </code></pre>
  
  <p>?></p>