Oct 12, 2001, 3:45 AM
Post #2 of 2
Password direcories needs to be supported by your server. It's done with a .htaccess file, but I don't know the details.
To make a control panel (for administrators only), you need to make an login screen (HTML). A CGI application will eventually make a cookie (both user and pass), and return that cookie in the header of a next 'You're logging in' document. If the browser stores the cookie, you're logged in.
It's even possible to crypt the password with the crypt() function (see the perldoc for it's usage). Finally, it's better a make a secure cookie, which is transfered only when a https connection is established.
My forum www.cool-programming.f2s.com uses such techniques.
Off course, you can place your control panel CGI in a password protected directory, which is much better (I never did it however).