I am editing an ASP form that is basically a newsletter subscription form. The issue is that I have no way of triggering an event alerting me if a user has already registered.
I want to find a way to make the form check if that user’s e-mail address exists within my database. If so, then just say, “You have already registered. Did you not receive a thank you email? Click here to receive the email again.”
As it stands, the user can register and they automatically get the Thank you form, but are not necessarily told whether they’ve already registered or not.
EDIT: Sorry for not mentioning this earlier, but this database is managed using Microsoft’s SQL Server. Yes, I am storing values using this method. Please let me know if I can include any more details — I’m not very familiar with DBs.
in pseudo-code:
I should also mention, since you are unfamiliar with databases, that you should always be wary of sql injection and take steps to prevent it.