title: Call PHP function with button onClick with parameter/ AJAX?
body: <p>Hello I want to call my function download when the user click on the button, basically:</p>
  
  <pre><code>&lt;input type='button' name='Release' onclick="document.write('&lt;?php downloadFichier($tab1, $t2) ?&gt;');" value='Click to Release'&gt;
  </code></pre>
  
  <p>Of course doesn't work, so I try to do with a AJAX, I don't know this language, but it is possible to do what I want: call my PHP function with 2 parameters?</p>
  
  <pre><code>&lt;button type="button"&gt;Click Me&lt;/button&gt;
  &lt;p&gt;&lt;/p&gt;
  &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $("button").click(function(){
  
              $.ajax({
                  type: 'POST',
                  url: 'file_product.php',
                  success: function(data) {
                      $("p").text(data);
                  }
              });
     });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Thank you for helping me.</p>