this code checks the ID number, that user enters, is being used in a table or not