PHP FormsLesson 28Free preview
PHP Form URL/E-mail
This lesson is part of PHP · All levels
Summary
The e-mail format and URL must be verified for the incoming data to be reliable. PHP provides built-in filters such as FILTER_VALIDATE_EMAIL and FILTER_VALIDATE_URL that are used together with filter_var(). This lesson also discusses how to handle non-validated scores.
Key points
- Filter_VALIDATE_EMAIL checks the format of the e-mail address
- Filter_VALIDATE_URL checks the format of the URL address
- Returns when the value does not pass validation
- Validation of the format is not a guarantee of existence, just making sure the form is correct.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.