Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: username and password verification from a table in Postgres

by tradez (Pilgrim)
on May 22, 2002 at 17:05 UTC ( #168519=note: print w/replies, xml ) Need Help??


in reply to username and password verification from a table in Postgres

Why not just do this?
$query = qq(SELECT * FROM users WHERE userid = \'$username\'); $sth = $dbh->prepare($query); $sth->execute; if(($sth->fetchrow)[0]){ print "$userName is a valid user \n"; exit; } print "$userName is an invalid user \n";


Tradez
"Never underestimate the predicability of stupidity"
- Bullet Tooth Tony, Snatch (2001)

Replies are listed 'Best First'.
Re: Re: username and password verification from a table in Postgres
by Anonymous Monk on May 22, 2002 at 17:18 UTC
    cause i am kinda a newbie and not sure of all the different ways to write perl. thanks!
      Didn't mean to offend, just throwing out an option. Good luck with this, and all your future perl endevours.

      Tradez
      "Never underestimate the predicability of stupidity"
      - Bullet Tooth Tony, Snatch (2001)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://168519]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2016-12-06 22:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (119 votes). Check out past polls.