Login / Register
User
Pass



Forget pass?

Search KnowledgeBase

 

 

 

Main > Programming
Minimize Text   Default    Enlarge Text
 

How do I stop people seeing a page without registering or logging in first?

Print
Save to list
E-mail
Created 2009-10-02
Modified
Views 2
Author Administrator
If you open a page in an editor you will see a line like this near the top:

include('session_handler.inc');

If it is present in the file then it forces visitors to either register or login to access the page. If it is not present then they can see the page without doing either.

For example, when you do a search from the index page it brings up the page prgminisearch.php. In the installation, this file is allowed to be accessed by non-registered members. However if you add the line shown above under include('db_connect.php'); in prgminisearch.php then visitors will have to login / register to see the search results from the index page.

Please note that the the session_handler should always be included after the db_connect.php




Related Articles
How do I open up a member page to guest users?
Near the top of most pages you will see the following line of code:   include('session_handler.inc'); This is what controls making sure the user is logged...
How do I add google analytics tracking code to the site.
Google Analytics (GA) is a free service offered by Google that generates detailed statistics about the visitors to a website. If you wish to add the tracking code to the...
How do I change the images in the skin?
Let's take the first (index) page. If for example you have the yellow skin enabled, all the files you are interested in are in /skins/yellow/, you will need an FTP editor...