1 (edited by nrwilk 2006-04-29 19:14)

Topic: How can I protect a page so that only logged-in users can access it?

I'm writing a new page for my site for Music downloads.

It's extremely simple, just a table with info and links.  I'm using the new page template so that I have the header and footer on the page too.

I have two problems:

1.  How can I protect the page to make sure only registered and logged-in users can access and download the files?

2.  It seems that after I've been on the new page for a while (even if I click on links while I'm there) I get removed from the list of online users.  What can I add to make sure that people browsing this new page still get listed in the list of online users?

Thank you so much for any help anyone can provide!

Also-
I'm learning so much about PHP and CSS from this project, but I've still never done it before.
Thanks so much for PunBB, Rickard!  I like it much better than any of the other Forum choices out there.

2

Re: How can I protect a page so that only logged-in users can access it?

if ($pun_user['g_read_board'] == '0')
    message($lang_common['No view']);

Re: How can I protect a page so that only logged-in users can access it?

Perfect!  Thank you!