BT> Hello again, BT> I have a form that users fill out and submit into a mysql database using php. BT> The problem I have is that there is only one unique field in the main BT> table... it's an int that's auto-incremented with each new entry. This works BT> fine unless the user accidentally submits the data twice. When this happens, BT> two entries are made that are identical except for the auto-incrementing int BT> field.
it will be easier if you just make sure the form cannot be sent twice... <input type="submit" [...] onclick="this.disabled=true; this.form.submit();"> you may need to add hidden field with the same name as submit button and some value... or get last unique id from DB, store it into forms hidden field and fetch the id again when the form has been submitted, it the id is different the data has been stored already... Pozdrawiam, Lecho Buszczynski SWAPZILLA - wymieniaj gry ZA DARMO! http://www.exerion.pl/swapzilla.php -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]