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

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -