Re: Protect Access to a Directory

From: Date: Wed, 05 Feb 2003 07:05:41 +0000
Subject: Re: Protect Access to a Directory
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134380@lists.php.net to get a copy of this message
On Wednesday 05 February 2003 04:06, Pushpinder Singh Garcha wrote: > Hi, > > I am using PHP and MySQL in my application. I have created a Login > System for using "Sessions". The problem that I am facing is that I > need to protect a large number of pages in my website. So I have tried > to use this method and it works fine for me : > > <? session_start(); > if (session_is_registered("valid_user")) > include ('guest.html'); > else include 'not_logged_in.php'; > ?> > > I get stumped here .... in order to be able to insert this code I have > to write for each of the 400 html files, 400 php files with the same > name. Most of the files are arranged in the form of directories. Is > there a better way to be able to do this (Using PHP and MySQL). Thanks > in advance ! I've answered a similar question yesterday. And many more people have done so in the past -- search the archives! -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Every journalist has a novel in him, which is an excellent place for it. */

« previous php.general (#134380) next »