I have to say if I were learning PHP I would start with something a lot simpler than a log-in system. I would get to understand PHP before I started to get into mySQL.
It can be difficult finding online courses as so many are out-of-date.
As far as the code goes, you can drop in and out of PHP within an HTML document simply by surrounding your PHP code with <?php and ?> tags.
I suggest trashing that whole folder and starting over. You need to read the PHP manual on php.net to learn more about PHP.
The first thing that most new comers who are learning any language almost always never do their research on the history of the language they are using.
What happened in order for this language to be how it is today?
Who invented/ created this language?
When was this language invented/ created?
Where was it invited/ created?
Why did the author invent/ create this language?
How did the author do it?
So many people I’ve seen that only used a language because they Googled “How to make a login system” and then poof. First result was PHP or ASP.NET or whatever came up first as the result. Almost every single person who’ve done this, will most likely not know where the language originated from and will most likely not understand how Unix base or Linux base the language is.