How do I display an error to the user based on MySQL constraints?

Okay thanks to some excellent advice here, I’ve added constraints to my MySQL DB so e-mails and usernames of registered members must be unique. However, it throws no error and acts like the member was registered, when in fact, they weren’t (I send a “thanks” message upon successful registration which still displays).

So how do I capture the error and display a message to the member? Thanks!

What code are you using to make the query?

It turns out I got this going in another thread. Thanks tho! :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.