Need help with php

I'm doing a simple website to manage a database and I need to add a loging form. I created the form and everything but haven't seen good examples of how to code the php for it. I was wondering if anyone could point me to a good tutorial on how to code  a loging for a website. The username and passwords are already in the database and I only have to distinguish the admins from the regular users which I can do with a simple query. PHP is not my forte, but they asked me to make the program on a website and not access or anything like that. Thanks in advance.

Try and hit me up on STEAM, I'll try to get you going.


wel basically what you would want to do is have a registration form, that creates a new entry in your users database, the password should be encrypted and saltet to your own liking.

then you need a login form, when the user enters his username and password, you should first check if the username is in the database already, if it is. then encrypt the password with THE SAME ENCRYPTION you used to store the users password and see if they match up, if they do you can login.

Does this kind of answer your question?