• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

User registration page validation after clicking submit.

 
gyan kumar
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a registration form there is a field "emailID" which should be unique so that dublicate rows will not be saved in database.

Now my query is how can at the time of submit the form I can execute the query in jsp so that it will take current emailID value.

please provide hint.

 
Patryk Sosinski
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Easiest way, make the column in the database unique and then just handle error, or during form validation you can execute for example:

If the value is more than 0 then record with provided emailID is already in database.
There are more efficient queries than above but i dont know what kind of database are you using. Still i am not sure if it is what you asked, as your question is really difficult to understand.
 
gyan kumar
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, your understanding is correct.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic