Perl Login Script

Posted on 2007-10-10
Last Modified: 2012-06-27
Hi,  I am in the middle of redesigning my website and would like some help in setting up a client login feature.  How do I do this?  I have been told I need to install a script onto my server? Perl? My hosting is with 1and1 Internet Ltd.  If you go to you will see my home page with the login on the left hand side but would like help setting the rest up.  Can anyone help me?

- ziggles
Question by:ziggles
    LVL 39

    Accepted Solution

    The most common method for providing login is when someone provides their username/password, you check to see if it is valid.  If so, you create a session, and send them a cookie with the session ID.  Then any pages you want to provide information based on the login, you read the session ID cookie, and get the information from your session variables.

    There is a module for perl that makes all of this very easy:  CGI::Session
    and the tutorial:

    There are other languages the provide similiar functionality also.
    LVL 17

    Expert Comment

    You'll also need a databse to store the session information and userid/login data.


    Author Comment

    That explain given did really register.  Anymore ideas.  Do I create database in in access?  Any explains would be great.  Am a new starter.
    LVL 17

    Expert Comment

    well, if you are using Perl to script the login, i would suggest using MySQL as the databse.  You'll need to verify your server has MySQL running and you'll need access to create the db and tables, etc.

    I won't lie to you, this will not be easy for a starter.
    LVL 48

    Expert Comment

    Note that CGI::Session doesn't need a full blown database.

    It supports:

    1.  Flat files
    2.  BerkleyDB
    3.  MySQL
    4.  SQLite

    The first two should require no setup.
    LVL 39

    Expert Comment

    The first option of Tintins post (Flat files) is the default method (it will be used if you don't specify a driver), and requires NO setup.  You should probably start with this, then move to something else if/when you need.


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
    Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
    Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now