Validate that there isn't duplicate emails

hu hungree 04 Nov, 2009
I have a bit of a unique issue. I want to make sure there is not dublicate entries within my database, the form is for a coupon and I don't want the same emails used more than once to redeem a coupon. However this is not a 'registration' form. There is no username, etc. I have connected the form to a database using the create table setup in chrono backend.

What server side validation can I add to verify that the email is not already in the database? I have seen several situations where this has been done BUT its usually with a registration form and the database its accessing to verify is different.

Any guidance? Ideas?

Thanks in advance
Gr GreyHead 04 Nov, 2009
Hi hungree,

Yes you can do that with server-side validation - include the MySQL query to check the database.

You can also do it with AJAX in the form. I think there was a similar query here a few weeks ago.

Bob
This topic is locked and no more replies can be posted.