I have a subdomain
accounts.mysite.com
What i want is one login panel for that subdomain, then after a user logs in it directs them to their own page (and
Include a file at the top of every file that should be blocked that contains something like:
This will redirect the user to user.php everytime they try to visit another file.
Edit: And don't forget to use session_start() at the beginning of every request.
session_start()