I can provide you with the thought process behind posting data to your server via jQuery, but we're not going to write the code for you. You should attempt to implement this yourself and post specific questions you have if you encounter trouble.
You need two components:
A client-side form with jQuery to accept input
A server-side PHP script which accepts data and passes it to MySQL.
You can divide these components into two pages, one for outputting the HTML page for the client containing the form and JavaScript, and one for accepting the post data. Or, you can put both parts in a single page, and decide which action to perform based on the request method: GET serves up the page and POST accepts and inserts the data.
The flow of logic runs something like this:
- User enters text in a form, and clicks "submit"
- jQuery intercepts the form submit action, pulls the text from the field and sends it to your PHP script via
$.post()
- Your PHP script is invoked and accepts the data via
$_POST
- Your PHP script connects to the database and inserts the data
There are various additional niceities you can add, like displaying a loading spinner on your form until the postback is complete, and sending a response indicating success or failure from your PHP script back to the client.