Forum Moderators: coopster

Message Too Old, No Replies

Need one login form

That will login to different dir's depending on user and password

         

casey133

1:48 pm on Mar 30, 2005 (gmt 0)

10+ Year Member



Hi all, my web host supports .htaccess which is how I am doing it now, so for example if Bob wanted to login he would go to:

www.mysite.com/bob using his name and password

Now of Mike wanted to log in he would go to:

www.mysite.com/mike using HIS name and password...

Ok what I am trying to do is make a very simple login form that I can place within my web page that will log both Bob and mike into their private areas depending on what username and password is entered. I am guessing PHP is the best place to post this question as my host supports PHP as well, does anyone know of a simple script I can use for this?

I tried the login form that lets you log into just one dir. but that’s no good, I need one form that will login to mutable dir's depending on user and pass.

Thanks for any help!

coopster

12:28 am on Mar 31, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Have you considered writing your own? It wouldn't be too difficult and you would certainly learn quite a bit by doing so.

I'm thinking you are going to need some form of file or database to keep track of your users and their "home" directory. Then an authentication/login script that confirms they are who they say they are and push them into their directory. Now, any file within that directory is also going to have to run an authentication routine to make sure that the user "logged-in" has the correct authority to get to the files in that particular directory.

casey133

12:52 am on Mar 31, 2005 (gmt 0)

10+ Year Member



Sounds a bit messy as I am new to PHP, are there any schipts on the web that would do the trick?