authenticating and redirecting with special access
| From: | Bryan Koschmann - GKT | Date: | Tue, 24 Sep 2002 17:55:56 +0000 |
| Subject: | authenticating and redirecting with special access | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-117456@lists.php.net to get a copy of this message | ||
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