Hey, I've completed the membership system on my website and this is something I'm trying to add onto it. That is if a certain defined member is logged in it will show the page, but if not it won't.
For example I have it setup so that user can login and and view a the member's only page. And obviously if they are not and try to access the member.php page it will redirect them to the login screen. What I'm trying to do it integrate it so that if a specified user is logged in then the user can view the page, but only that user. And if not it's it directs them to the login page.
In-depth example: If the user Admin (and only admin) is logged in they can view example.com/admin if anyone else or someone not logged in tries to view the page it will just take them back to the login page. So if John Doe tries to access the page example.com/admin it won't let them because they are not logged in as admin.
I already have a members username/password created and activated to use for this, It's just username: admin password: 1234. I'm guessing it would be something like instead of $_SESSION['s_username'] = $username; it would be $_SESSION['s_username'] = admin;
I'm not really a php coder, but I try any help anyone can give me would be very much appreciated and wouldn't go overlooked.
Thanks in advance!