Some Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KumbhaniMehul
    New Member
    • Apr 2010
    • 2

    Some Help

    I have one registration form,in that one username field,
    when user fill this text box and click on the "Check Availability" then my servlet have to check that user is exist or not.

    and i want one boolean answer (true/false).

    Have any other trick to fulfill my requirement?..
  • jkmyoung
    Recognized Expert Top Contributor
    • Mar 2006
    • 2057

    #2
    Where are you storing usernames? Are you accessing a backend database somehow?

    Comment

    • KumbhaniMehul
      New Member
      • Apr 2010
      • 2

      #3
      Originally posted by jkmyoung
      Where are you storing usernames? Are you accessing a backend database somehow?
      Yes, I have User_Details table and i have stored UserName field in this table.
      I want to check that name is available or not?
      In my table UserName is primary key.

      Comment

      • jkmyoung
        Recognized Expert Top Contributor
        • Mar 2006
        • 2057

        #4
        Please excuse my denseness, but I'm still uncertain as to with what part you're having the problem.
        name = textBox.Text();

        "select *
        from User_Details
        where UserName = '"+name+"'

        if results exist, then the name exists.

        Comment

        Working...