You should test if the $shortname is equal to the $shortname you gave on insertCountry().