Well, you shouldn’t be using mysql_ first of all. I strongly suggest you sticking with 1 library. You seem to be jumping back and forth between different libraries. Just stick with 1 and use it. If you’re going to use mysqli_ then stick with it.
Hmm…it doesn’t work. I get a blank page after hitting submit. If the data is a duplicate, it still makes a blank page but doesn’t insert, and if it is NOT a duplicate, it’s inserted, but still produces a blank page. ??