PDF Google Drive Downloader v1.1


Báo lỗi sự cố

Nội dung text Unit 5 Introduction to Advanced Server Side Issues - PHP.pdf


if($problem. && strlen($data) == 0){ die($problem) } Return $data } Validate Email Address There is no way to be 100% sure an email is actually working unless we send an email there. What we usually do is check if the email syntax is valid. Here is a simple way to check if data entered into field named “email” is an email address without any unnecessary complication and fancy regular expressions. $email = htmlspecialchars(%_POST[‘email’]); if(!preg_match(“/([\w\-] + \@[\w\-] +)/”, $email) { die(“Email address not valid”); } Validate URL address If we have an input field named “website”, we can check for a valid URL like, $url = htmlspecialchars($_POST[‘website’]); if(!preg_match(“/∧(http?:W + ]\w\-] + \ [\w\-] +) /; $(m)) { die(“URL address not valid”); } Digit 0-9 only if(preg_match(“/\D/”, $age)) { die(“Please enter numbers only for age.”); } Letters a-z and A-Z only if(preg_match(“/[∧„a-z A-Z]/”, $text)) { die(“Please enter letters only!”]; } Anything but whitespace if(Preg_match(“/\S/”, $text)) { die(“don’t enter any space”); }

Tài liệu liên quan

x
Báo cáo lỗi download
Nội dung báo cáo



Chất lượng file Download bị lỗi:
Họ tên:
Email:
Bình luận
Trong quá trình tải gặp lỗi, sự cố,.. hoặc có thắc mắc gì vui lòng để lại bình luận dưới đây. Xin cảm ơn.