Taking a look at other people's scripts is a great way to learn (assuming they actually work), but the best way is to read some tutorials
and understand PHP/MySQL.
If you understand PHP, you can PM me and I can send you the scripts that I used for one of my websites
and you can study those.
It's nothing fancy, but it does the job. I'm not promising that it's perfectly secure, but it seems to be ok. You're welcome to register and check out the control panel. With a little work, it would be easy to add profile pages.