I looked at the print_r() function, I never knew what it was but it looks like it could be useful. Thanks for that.
OK everything is working as it should now: species, year, sex, price and the correct subcat id are being entered into the table as expected. But on initial page load it still gives the same error which disapears after the first form submit.It doesnt come back if you keep submitting more animals to the db. Like I said, all seems to be working fine but its not nice seeing the error at the start.
Any ideas why this would happen?