Forum Moderators: coopster
Say your file is secure_data.php
At the start of your file, you can do your checking to see if the user logged in has permission, and if they do, you can include the file there. If they don't, it can display an error.
You want error checking etc.. of course too, so no one can fake authentication.
Would that work for you?