Try using htaccess authentication instead?

-Ade
www.phpscriptsearch.com

-----Original Message-----
From: Jason Wong [mailto:[EMAIL PROTECTED]] 
Sent: 05 February 2003 07:06
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Protect Access to a Directory


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.
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to