PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon May 25, 2020 11:28 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Nov 25, 2009 12:55 pm 
Offline
Forum Newbie

Joined: Wed Nov 25, 2009 12:51 pm
Posts: 6
Hi,

I am using if (isloggedin()) in a php web page to produce two views for users who are logged in and users who are not logged in.

if (!isloggedin())
$content .= elgg_view("my1channel_pages/loginbar");
if (isloggedin())
$content .= elgg_view("my1channel_pages/loggedinbar");

The problem is if I am loggedin and I hit the logout button which forwards me to the home page the above code does not run. Only if I refresh the page does the code runs. If a user hits the back button taking you to the home page the above code does not run. Again refresh and it works.

So whats the problem here, is this not the correct way to implement this code to produce two different views?

One method I have tried is two force the browser not the cache the home page but its not working on all browser and it seems wrong.

Thanks,
4dplane


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot] and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group