For your first question:
1. form-data POST method using simple HTML form:
HTML :
<form action="/action_page.php" method="post">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br>
<input type="submit" value="Submit">
</form>
other option is:
JS :
$.ajax({
type: "POST",
url: url,
data: data,
success: success,
dataType: dataType
});
or using $.post
check out jquery ajax / post: jquery post
And for the 2nd question:
2. Sending JSON data as body element using HTTP POST method
For backend soultion you will need to create an api on your server and call to his methods from your client side. The api will get the json data in post, parse it and will run the logics that include db on the server-side after that the api will return the answer to the client. (In this way the client can use function that include db without "knowing" anything about the db, it just need the right url).
Creating a REST API using PHP
or if you preferre c#: web-api