Javascript with Php MVC
<p>I'm new in PHP MVC, I have a question about how javascript works with php mvc</p>

<p>If I have a page with a button, when user click the button
It will send to next page and update data in database</p>

<pre><code>$(document).ready(function(){
    $("#btn").click(function(){
        $.load(){...   }    
        or $.post(){.....}//post data to another page
    });
});

//next page
if(isset($_POST[])){
  //update data
}
</code></pre>

<p>My question is </p>

<p>Should I send this data to controller than pass to model and output in view(if we need respond something)</p>

<pre><code>Button --javascript--&gt; controller -&gt; model(update data) --send data back--&gt; view
</code></pre>

<p>or </p>

<p>I can just send data to page and update without mvc</p>