DB and INSERT's allready exists?
| From: | Martin Klaffenboeck | Date: | Wed, 13 Jul 2005 08:10:06 +0000 |
| Subject: | DB and INSERT's allready exists? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-19960@lists.php.net to get a copy of this message | ||
Hello!
I'm using an insert statement to register new users. Now I set a mysql
'Email' field unique so that an user cannot register twice.
But how can I check if the INSERT failed because of an unique? I want
to tell the user he's allready registerd and ask to send a new password.
How can I do that?
thanks,
Martin