After browsing through SEVERAL pages here - I'm kind of more confused now, than before I started!
I need to restrict access to my pages for anyone that is not logged in.
The login works like this:
index.php
The user types in usr name and psw
Info is sent to authentication.php
Authentication.php
The user name is checked against the database.
If exists, info is retrieved, inkluding psw.
If pswd is correct, user name and ID is logged into sessions.
User is forwarded to registrering.php
At the moment i can type in registrering.php directly and the page opens. That is not suppose to happened.
I recon I have to controll if the user is logged in.. somehow.
What is the easiest way to do this?
Can I use .htaccess for this?