Old 08-07-2008   #1 (permalink)
Registered User
 

Join Date: May 2008
Posts: 3

Member Tutorial: If user is logged in.

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!
Trueskool is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 08-07-2008   #2 (permalink)
Registered User
 

Join Date: May 2008
Posts: 3

Thanks for your interest in viewing the topic but I was able to solve it myself.

Trueskool is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Member Tutorial: problems with register jull HTML / PHP / ASP / JS 0 05-20-2008 11:18 AM
Member Tutorial: Taking it further. Trueskool HTML / PHP / ASP / JS 1 05-11-2008 06:09 PM
Create User Levels For The Membership Tutorial? alteredillusion HTML / PHP / ASP / JS 2 12-31-2007 02:19 PM
Need a sig and a user bar :D 1337[CS] The Marketplace 2 08-04-2006 02:33 PM
Intermediate PS user, new Biorust member. Av_Skyggene Introductions 3 07-25-2006 09:56 PM


All times are GMT +1. The time now is 09:19 AM.

Powered by vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT