?
Solved

Perl Login Script

Posted on 2007-10-10
6
Medium Priority
?
1,156 Views
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 www.garybray.co.uk/new/index.html 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
0
Comment
Question by:ziggles
6 Comments
 
LVL 39

Accepted Solution

by:
Adam314 earned 1500 total points
ID: 20051937
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
    http://search.cpan.org/~markstos/CGI-Session-4.20/lib/CGI/Session.pm
and the tutorial:
    http://search.cpan.org/~markstos/CGI-Session-4.20/lib/CGI/Session/Tutorial.pm

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

Expert Comment

by:jasonsbytes
ID: 20053023
You'll also need a databse to store the session information and userid/login data.

0
 

Author Comment

by:ziggles
ID: 20053048
That explain given did really register.  Anymore ideas.  Do I create database in in access?  Any explains would be great.  Am a new starter.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:jasonsbytes
ID: 20053098
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.
0
 
LVL 48

Expert Comment

by:Tintin
ID: 20053153
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.
0
 
LVL 39

Expert Comment

by:Adam314
ID: 20053181
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.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
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…
Six Sigma Control Plans
Suggested Courses

840 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