Thank you for getting back to me. Unfortunately, I couldn't get this code to work. I still get the error, " Duplicate entry 'A New Course' for key 'coursetitle' ". I tried placing the code between the two inserts (and several other places and hiding other bits of code as well), but no luck.
I was thinking that somehow code could be used to bypass the first insert if a duplicate were found and just return the id of the duplicate. (Similar to how the id of a new insert is returned?), and then use the id of the duplicate in the second insert? Does the error message mean the code is not getting past the first insert? I apologize for not understanding this better. Or maybe I just goofed something up...
I tried working with this code last weekend. I don't know if it could be helpful. I wasn't able to make it work. With my luck, it was probably meant to do something else entirely... :-)
Maybe I have the database or validation set up wrong?
I would appreciate if you could let me know what I am doing wrong and look at this again for me.