title: Calling a php function when onchange fires from input
body: <p>Hello, I have an input field named <code>result</code>. I want to call a function when something changes in this input. I tried this : </p>
  
  <pre><code>&lt;input onchange="maFonction" id="result" readonly="readonly" type="text" value="0" size = "10" /&gt; 
  </code></pre>
  
  <p>And tried to call this function </p>
  
  <pre><code>&lt;?php
  function maFonction()
  {
  
  $a = 40 ;
  if ($result &gt; $a) {
  
       echo "trop dheure";
       } elseif ($result == $a) {
       ?&gt;
                      &lt;input onclick="s(this.form);" type="button" value="sauvegarder" /&gt; 
          &lt;?php
          } else {
      echo "moins de 40 heures a été effecuté";
  }
  
  
  }
  ?&gt;
  </code></pre>
  
  <p>What mistake did I do or what am I missing?</p>