in reply to Login Script
The code where you retrieve your form parameters should like something like this:
my $user_name = $cgi_object->param('user_name'} || ''; my $passwd = $cgi_object->param('passwd') || ''; unless ($user_name && $passwd) { # handle cgi param error }
The database query needs to use a placeholder, and check for errors - something like this:
eval { $sth = $dbh->prepare("select pass from users where user=?"); $sth->execute($user_name); }; if ($@) { # handle database error }
Since HTML is stateless, you need to use something like CGI::Session to remember that a particular user is logged in.
Using a framework will make your life much easier.
Here's a link to a simple login tutorial I wrote:
RFC: Proposed tutorial - simple login script using CGI::Application
That should help get you started.
In Section
Seekers of Perl Wisdom