The Artima Developer Community
Sponsored Link

Java Answers Forum
how to validate username and password in java

1 reply on 1 page. Most recent reply: Dec 8, 2003 5:20 PM by Senthoorkumaran Punniamoorthy

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
Delie

Posts: 12
Nickname: tuti
Registered: Oct, 2003

how to validate username and password in java Posted: Dec 8, 2003 5:39 AM
Reply to this message Reply
Advertisement
Hi, it my first time using java with a database. and i must check if username and password match in the database. How do i do it? If any one knows a book that can help me, please give me the name and author
thanks


Senthoorkumaran Punniamoorthy

Posts: 335
Nickname: senthoor
Registered: Mar, 2002

Re: how to validate username and password in java Posted: Dec 8, 2003 5:20 PM
Reply to this message Reply
The table you are storing the username and the password is also going to have a ID (Primary Key) I guess. So just do a select

SELECT id from USERS WHERE username = 'xyz' and password = '123';

and if you get an ID in return the user is a valid user, if not invalid user.

Flat View: This topic has 1 reply on 1 page
Topic: JAVAC CAN'T READ FILE Previous Topic   Next Topic Topic: java class files

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use