title: jQuery ajax & PHP - insert data into mysql database
body: <p>So I've been trying to figure out the method of posting form data from a textarea using jQuery's <code>ajax()</code> function to a mysql database. Problem is, I don't really understand the theory of doing so.</p>
  
  <p>Say there's a form:</p>
  
  <pre><code>&lt;form method="post" action="action.php"&gt;
    &lt;textarea name="somecontent" rows="5" cols="30"&gt;Some content&lt;/textarea&gt;
    &lt;input type="submit" name="submit" value="Post to db using ajax" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>The form points to action.php which processes data, yadayada. In a theoretical sense, how could I manipulate jQuery ajax to post the data rather than directly submitting the form data to action.php?</p>
  
  <p>Edit:
  I don't understand how to send the data with ajax. </p>