title: Calling a particular PHP function on form submit
body: <p>I was trying to call a particular php function in submit of a form both the form and php scripts are in same page. My code is below.(it is not working and so I need help)</p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
      &lt;form method="post" action="display()"&gt;
          &lt;input type="text" name="studentname"&gt;
          &lt;input type="submit" value="click"&gt;
      &lt;/form&gt;
      &lt;?php
          function display()
          {
              echo "hello".$_POST["studentname"];
          }
      ?&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>