Gathering User Info Using JavaScript?

How would I automate a process using JavaScript, so that when a person submits a form their user info (email, location, name, etc…) would be collected into a database?

you would need to submit the form to the back-end of your website, process the information and store it in the database, and send back a response (thank you page or something, depends what the information is for)

if you want to stay in JS, you can use nodeJS for the back-end of your website + database