[thelist] MySQL/PHP DWMX Duplicate Entry Error Question

Phil Parr phil at philparr.com
Sun Nov 3 14:36:01 CST 2002


Hello all,

This is my first post here.  I'm learning MySQL/PHP using DreamweaverMX
and picking things up at a relatively comfortable pace.  I've
encountered my first dilemma though:

I've created a User Registration form that posts data to a Clients
table.  I've designated the Email Address field as unique. The form
works fine and propagates the table without error, however after testing
it by trying to submit a duplicate email address, the page returned is
blank except for this one line of text:

Duplicate entry 'phil at philparr.com' for key 2

Which is fine - it prevents a duplicate email address.  BUT how do I
"pretty up" the page?  As this doesn't list an error number, I am unsure
what such a result is called - therefore I don't know what to look up in
the indexes for the books I'm learning with.  Those books are:

glasshaus' Dreamweaver MX: PHP Web Development, and
Sams PHP and MySQL Web Development

I'd like to be able to display a message like "Sorry - this email
address is already in use" and provide a link back to the form.

Links to tutorials, appropriate page numbers in the above books, or just
plain spelling it out for me would be greatly appreciated.  Take it easy
though - I'm a newbie.

I'm at phil at philparr.com - Thanks in advance!





More information about the thelist mailing list