Login form validation

Hello i am new to web programming…i have created a login form (login.php) and another file (myfile.php) which contains a message “welcome user:…, your pass is:…” with method get, i have created a php script to connect my database. I want to validate only the right users not everyone who texts his password and username, how can i do that? i saw the case of session but actually i cant cleary understand how to use and what it does.

no, i have not, i am very very new with the topic…shall i send you and email to contact ?

https://github.com/png3/vallog ,the files are login.php and test.php (i have change the db settings(i believe you understand me))

i dont want evereyone that texts username and password to enter, only the members and to others display a message like “you are not a member you must register e.g”

i havent understand if session can do this or i should “play” with the database