0% found this document useful (0 votes)
5 views

Php Practical No.12 Outputs

The document presents a simple PHP program that checks the validity of an email address. It uses the filter_var function with the FILTER_VALIDATE_EMAIL filter. The output confirms whether the email is valid or invalid.

Uploaded by

ARYAN MOHADE
Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
5 views

Php Practical No.12 Outputs

The document presents a simple PHP program that checks the validity of an email address. It uses the filter_var function with the FILTER_VALIDATE_EMAIL filter. The output confirms whether the email is valid or invalid.

Uploaded by

ARYAN MOHADE
Copyright
© © All Rights Reserved
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
You are on page 1/ 1

PRACTICAL No.

12
Outputs

Q.1 Write a simple php program to check that emails are valid.
Ans.

<?php
$email = "[email protected]";

if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
echo "Valid Email";
} else {
echo "Invalid Email";
}
?>
Output

Valid Email

You might also like