DedeCMS custom form mobile phone number and email verification
#dedecms’ custom form does not filter the submitted information, and spam messages are often harassed. (Recommended Learning: Dream CMS )
## This site provides 2 testing rules. It uses regular methods to detect mobile phone numbers and mailboxes, modify Plus Just insert the following code into diy.php before submitting it to the database.
$telphone and $email are the submitted mobile phone number and email address. If they are not set by me, you can modify them yourself.//判断手机号码是否正确 if(!eregi("^13[0-9]{9}|15[0-9]{9}$",$telphone)) { showMsg('手机号码不对,请正确填写', '-1'); exit(); } //验证邮箱 if (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",$email)) { echo "请您填写正确的E-Mail 地址!"; }
The above is the detailed content of DedeCMS custom form mobile phone number and email verification. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
