While this is certainly possible, it may not be so simple, depending on your current Perl level. There are a lot of issues you have to decide first:

This password system would be highly dependent on the structure of your site - is it all html pages, all perl scripts, or a combination of both? This is important because you have to decide how you will determine the status of an authorized user, and how you will pass his/her status from page to page. This can be done either with cookies, or by passing a value in the url or in a hidden form, or a combination of both.Every page would have to re-determine the authorization status of the user. Although I guess in your case, you would just need to check the authorization during form submission.

Yes, of course you can use an oracle table, but you don't have to. It depends on your anticipated number of users. You can go from a simple text file or the simple db database. Of course, you will probably want to worry about crypting these passwords and/or using a secure site if necessary.

I was thinking...if the only difference between authorized and unauthorized users is form submissions, you can avoid the whole cookie thing, and just ask for a password with each form submission.....depending on your site.......

In reply to Re: cgi passwords by fpi
in thread cgi passwords by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.