So I've been trying to figure out the method of posting form data from a textarea using jQuery's ajax()
function to a mysql database. Problem is, I don't really understand the theory of doing so.
Say there's a form:
<form method="post" action="action.php">
<textarea name="somecontent" rows="5" cols="30">Some content</textarea>
<input type="submit" name="submit" value="Post to db using ajax" />
</form>
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?
Edit: I don't understand how to send the data with ajax.