Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: login page

by mikeB (Friar)
on Dec 19, 2006 at 15:28 UTC ( [id://590683]=note: print w/replies, xml ) Need Help??


in reply to Re: login page
in thread login page

Along the same lines, it's a bit of a security risk to store cleartext passwords in the database. Better to store a hash or encrypted version of the password. Check out the MD5 and Crypt:: family of modules on CPAN. You might also want to consider letting the database do the matching work with something along the lines of:
my $user_info = $dbh->selectrow_hashref(q/
   select <some fields> 
   from users 
   where id = ? and password = ?
/,undef, $id, $password);

if (defined $user_info) {
   # valid user
} else {
   # handle a bad one here
}

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://590683]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-25 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found