Your issue may be with PHP Validation and not the code you have just posted. Try to share relevant code so that we can help