This PHP code checks if an email address is valid by using the filter_var() function to validate the email against the FILTER_VALIDATE_EMAIL filter. It passes a sample email address and if it is valid, it echoes a message saying so, and if invalid, it echoes a message saying the email is invalid.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
713 views1 page
PHP Practical No.12
This PHP code checks if an email address is valid by using the filter_var() function to validate the email against the FILTER_VALIDATE_EMAIL filter. It passes a sample email address and if it is valid, it echoes a message saying so, and if invalid, it echoes a message saying the email is invalid.