/    Sign up×
Community /Pin to ProfileBookmark

to make a hidden tab visible after loggin in

hi,
i have a navigation toolbar with a tab called photos.
i want it to be visible only after user authentication. what i am doing right now is that after user logs in he will be redirected using header to a copy of the page with the photo yab. but idon’t want this.
i want the tab to be there and made visilble after logging in
help??

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@MindzaiFeb 04.2010 — How do you verify a user is logged in? Sessions? You should have some method for checkign a user's logged in state and then a simple if statement is enough to remove the tab from logged out users. Bear in mind though that you will also need to protect the page that the tab links to (if it links somewhere) since users can still navigate to the page directly.
Copy linkTweet thisAlerts:
@nikiiteaauthorFeb 05.2010 — ya i am using sessions but still the problem is that the tab is visible to all even after the condition

if(isset($_SESSION['user']))

is checked
Copy linkTweet thisAlerts:
@MindzaiFeb 05.2010 — Maybe you need to check the value of that variable instead of just its existence? It's a bit hard to just guess though, it would be helpful if you posted the source code.
×

Success!

Help @nikiitea spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...