Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cgi beginner

Status
Not open for further replies.

bardley

Programmer
May 8, 2001
121
US
Hi all.

CGI newbie. We are designing a website with a little security pop-up box asking for name and password. I have been asked to write (or find) a Perl script that will take the username and password, compare them against username/passwords from flat files, then redirect to a specific page for that client.

How can I do this? I don't know if HTML code calls a Perl script, or how to get it started. Any pointers very appreciated. Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
 
The problem with doing it that way is that once the user knows which page s/he is redirected to, they can go directly to that page, bypassing the login entirely. The only ways around this are to use .htaccess and .htpasswd protection (which alleviates you having to code a program to do the password checking), or to have your login program actually create the page the user sees rather than doing a redirect. If you don't mind the browser's login popup window, using htaccess is the easier way to go. There are a number of free or cheap programs to help maintain htaccess and htpasswd files. Check out:

There are lots of other sites you could try to, but I don't remember the URLs.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top