FabioRicali.it

Validare un indirizzo email con php

by info@fabioricali.it on mag.08, 2010, under PHP

Un modo semplice e volce per validare un indirizzo email tramite php รจ rappresentato dalla funzione (da PHP 5) filter_var
ecco un esempio:

<?php  
if(!filter_var("email@email.com", FILTER_VALIDATE_EMAIL)){
	echo("E-mail non corretta");
}else{
	echo("E-mail corretta");
}
?>

In caso di successo ritorna il valore, altrimenti FALSE.


Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...