Been away for the weekend, but I'll try to help you a bit more
Your main issue would be the fact that you already have some system installed, which means, I don't know what files are in /public_html/ -could you show me?
As you're quite new with website development, it's a tiny bit of learning, but don't let that put you down! Coding is fun when you start out!
As a matter of fact @ckhawand has a topic where you might be able to learn a bit about php programming
How to create a membership system for your website with PHP 5.6
I think that implementing that code would be easier, as it gives you an understanding of the code, and it is slightly more secure than the one you are using
From that source, we'll love to help you out, and make a "forgotten password" function you could use.
If you still want to use the source you've found, that's fair, and I'll love to help out with that one as well.
Anyway, for ease, could you take a screenshot of the public_html folder?