How to work with HTML forms

I built an HTML form following the tutorial on FCC, but I’m not sure how to actually use it outside of FCC. For instance, I would like to be able to do something with the information input by the user. Things I would like to be able to do:

(1) Console.log() or write to HTML some of the user input;
(2) Store the user input in a new file;
(3) Store the user input in a database;

I tried following W3 Schools tutorials, but all that I got when I click to submit the form is to download a copy of the php file referenced in “< form action=welcome.php” … >

I’m gathering that I can use PHP to handle the form and with MySQL. I haven’t found a reference on how to do this though. Any suggestions? (Preferably something you have actually used to learn this stuff - I have done plenty of Googling, but nothing I’ve found has been very helpful.)

What about (2)? Can I use PHP to do this? Do I need PHP to do this, or can I do this just with javascript? Lastly, what is the minimal way of accomplishing (1)?

I would recommend node.js. I like mongoDB for the database, you can setup a free database on
FreeCodeCamp goes into this setup in the Apis And Microservices Certification