title: Best practice to handle ajax jquery database queries?
body: <p>I have a "little" problem because I don't know whats the best way to handle ajax jquery database request?</p>
  
  <p>So far I've done it this way:
  For ever (single) database request I created a new .php file like:</p>
  
  <pre><code>newbill.php
  newcosumer.php
  listallbills.php
  updatecostumer.php
  </code></pre>
  
  <p>..and so on and pull the data via:</p>
  
  <pre><code>$.ajax({
   type: "POST",
      url: "ajax/newbill.php",
      data: "..."
      success: function(msg){    
      ...
      }
   }); 
  </code></pre>
  
  <p>..what I don't like is all the .php files for only ONE! database request!?<br>
  There must be a better way to handle this??</p>