php - How to check if text has 6 numbers -
i have jobs site , , visitors able add jobs on front end of , need check job details see if has phone number within or not using php code
example of 6 digit numbers 123456 , 533434 , no other format, if there 6 digit numbers error message show make visitors remove details section
i need :
if (strpos($_post[details],'######') !== false) { echo 'remove phone number job details'; }
if (preg_match('/[1-9]\d{5}/',$_post[details])) { echo 'remove phone number job details'; }
Comments
Post a Comment