title: jQuery.AJAX post() - a few questions and issues
body: <p>I'm making a site where a user spams a button and increases their score in doing so. </p>
  
  <p>I don't want the page to refresh when the button is clicked, so I wanna use AJAX to send the data to the server. Here's what I have so far:</p>
  
  <pre><code>&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.4.3.min.js"&gt;&lt;/script&gt; 
  &lt;script type="text/javascript"&gt; 
  $(document).ready(function(){ 
          $("#update").click(function() { 
              $.ajax({ 
              type: "POST", 
              url: "update.php", 
              data: "increase", 
              dataType: "Boolean", 
              success: function(update) {} 
                  }); 
                      }); 
                      }); 
  &lt;/script&gt; 
  &lt;button id="update" type="button"&gt;Button&lt;/button&gt; 
  &lt;div id="counter"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>It's not much at all, I know, but I'm very new to this stuff. The main problem I'm having is with the syntax that you're supposed to use. I want the server to return a Boolean variable if the request is successful, so would I have Boolean in the 'Data Type' in inverted commas, apostrophes or what?</p>
  
  <p>Also, I'm struggling with grasping how the ajax script knows whether it's successful. Is there gonna be something in the 'update.php' script that will return a 'TRUE' or 'FALSE' value?</p>
  
  <p>Finally, the data that's gonna be sent to the php file is supposed to tell the php to update the mysql table with the new score. How should I go about telling the php to update the mysql if it receives the data that the ajax is sending?</p>
  
  <p>Thanks a lot</p>