make the directory outside of the web server root path and create some PHP
routines to display the directory data as you see fit.  PHP can see the
entire file store, whereas the webserver can only see data below it's root.
That way you keep security and can also display the data.

-----Original Message-----
From: Bryan Koschmann - GKT [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 10:56 AM
To: PHP General
Subject: [PHP] authenticating and redirecting with special access


Hello,

I'm fairly new to PHP, but I am studying (ORA's "Programming PHP"). I am
trying to do something but can't quite figure out how.

Here is what I need to do:

User goes to an address. They login with say "jsmith" and their password.
the PHP script gets authenticates against a MySQL database. I have this
working.

After being authenticated, user is redirected to a directory to which only
they have access to (say www.mydomain.com/jsmith). I have this working to
the redirect part.

Where I am stuck is how to make it so someone can ONLY get to that
directory if they are authenticated, and cannot access it directly.

Now, I was thinking that there could be something php-based in that
directory that checks if they are already authenticated, but the problem
is that the files are generated by another program that I cannot modify.

I'm also having a problem where I have to close my browser to be able to
re-login, but I'm guessing this is a session problem and I just haven't
gotten that far yet.

Does anyone have any ideas here? I did a lot of searching and didn't find
much of anything.

Thanks in advance!

        Bryan


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

Reply via email to