Gooday people.
I read up this tutorial on how to create a user authenticaon script but then I realised how bad it is. It uses the following method to authenticate. This works well. But the tutorail had no info on how to protect the pages it self. You could go to the page direct adn they would obviously work.
Now querying this databqse is great as I can use one of the variables ( resultAuth2['idname'] ) to query the main page that the login page redirects to.
I read somthing about global variables or somthing but that tutoral just dont make sence to me but sounds like what I need.
Q1. How can I get a variable to the next php page.
Q2. How can I redirect them to the login page if they try to find the main page without them login in.