...

View Full Version : Alert user if data inserted is not unique



Crazydog
02-22-2007, 05:45 AM
I know there's the way to do this to check if the data was inserted, but my form is set up like this:

Enter 2 fields of info
submit
enter more info
submit + enter into mysql

I want to know if I can check for uniqueness after the first submit, so that if the data is unique, it won't be stored until after they enter more info.

Would I have to do some kind of workaround where I attempt to insert it, but if it doesn't get inserted, I delete it and produce an error for them to see?

Fumigator
02-22-2007, 07:38 AM
How bout a SELECT query using the entered data, if the query returns something then you know the data's not unique.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum