password protect based on userID

i need to be able to provide access to files specific to a userID from a single login screen. I have already created the login screen, but need to know what code to attach and how to specify a USERID gets a prespecified file.

thanks
dmyoungAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jhurstCommented:
typically one uses the .htaccess system of the web server.  With this you just specify the directory with the files is to be protected and set up user names and passwords for the directory and the system does everything else for you.

If you really want to re-invent the wheel and do it yourself then you should set a cookie when the user name and password is accepted and then all further access to your site will pass that cookie.  You can then check that cookie in the cgi that you use to send the files.  This is definitely not the recommended method.

By the way, the former method is the method used by this system, experts-exchange, if you select the non-cookie method of logging in.
0
dmyoungAuthor Commented:
thanks for note, but i am looking for more specifics.....

As in how to create the password file and the access file, where to place them, etc.....

0
shiversCommented:
i dont wanna grab jhurst's points, but for info on how to set up .htaccess stuff see this URL for the NCSA spec:

http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html

for simpler information, see the basic instructions on the Earth Host web site (some stuff may need to be changed to suit your ISP):

http://www.earth-host.com/passprotect.htm

0
jhurstCommented:
let shivers have the points
0
shiversCommented:
thanx jhurst - but you got ther first - see other question - i'll give u half

for info on how to set up .htaccess stuff see this URL for the NCSA spec:

http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html 

for simpler information, see the basic instructions on the Earth Host web site (some stuff may need to be changed to suit your ISP):

http://www.earth-host.com/passprotect.htm 
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.