...

View Full Version : can someone point me in the right direction?



finstah1
08-27-2007, 02:16 PM
Here's what I'm trying to do.

I have a generic link that allows clients to login to my site. www.site.com/clients, I'd like to be able to have the client, depending on the login, go to the directory associated with that client using Apache authentication (popup login window)

In other words, if Acme is the company logging in, I want to append the username variable to the URL, www.site.com/clients?user=Acme so it pops up the authentication window and allows Acme to login in to their directory.

The directory name will coincide with the user name. (i.e. directoryname=username)

Can someone tell me where to start researching this so I can play around with it and get it working on my site?

I'm not looking for code, I want to do it myself, just need a direction to go and what "terms" I need to learn.

mlseim
08-27-2007, 03:17 PM
You want to look at PHP sessions.

http://www.google.com/search?hl=en&q=php+sessions+login+tutorial&btnG=Search

This will allow someone to "login" and you won't need to append
any variables. On any other pages, you can check for that login
anytime you want, and make decisions based on that login.

You can also create another session variable at the same time that
indicates the name of the user's directory ... that too can be queried
at any time and used on any of your other pages.

malik
08-27-2007, 05:15 PM
finstah1 - If i have understood you correctly, I have been setting up the exactly the same thing but I found the end result a little untidy since all it did was simply add another login screen for the user.

mlseim - correct me if i am wrong - i believe you are suggesting using php seesions to handle all of this and loose the apache authentication (popup login window)?.

fl00d
08-27-2007, 05:34 PM
no you can use sessions for http authentication.

mlseim
08-27-2007, 07:14 PM
oh, I guess I didn't see that part about Apache.

finstah1
08-27-2007, 08:27 PM
finstah1 - If i have understood you correctly, I have been setting up the exactly the same thing but I found the end result a little untidy since all it did was simply add another login screen for the user.

mlseim - correct me if i am wrong - i believe you are suggesting using php seesions to handle all of this and loose the apache authentication (popup login window)?.

hmmm,

so what is the best way to approach this then if the above is untidy?

malik
08-27-2007, 08:42 PM
hmmm,

so what is the best way to approach this then if the above is untidy?


That's only my opinion of course :).

I'm now looking to replace my current apache authentication popup login window with a more typical login screen. i.e a username and password on a webpage not a popup.

Since my php knowledge is limited im currently trying to find out what options there are in this respect i.e. how to redirect users based on username/password and how to limit there access to specific pages.

finstah1
08-27-2007, 09:10 PM
That's only my opinion of course :).

Since my php knowledge is limited im currently trying to find out what options there are in this respect i.e. how to redirect users based on username/password and how to limit there access to specific pages.

Ditto, I know basic php but that's about it.

I've figured out how to get them in with a flat file (Avoiding the Apache popup altogether.) But I can't figure out how to associate the user and pwd in the flat file with their directory.

If you find anything useful, please let me know



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum