I need validate email on my form... There are people play in my web site every single day typing crazing stuff and sending... Every day I receive at least 50 email about nothing.
I found this web site "http://www.soaptray.com/2008/04/validate-email-addresses-using-php/"
But I don't know how to use it in my form scrip. Should I call the function to validate from the index.htm or form.php
Some one please can help.
my www is www.creativelawnservice.com
following its my script:
<?php
date_default_timezone_set('America/Chicago');
$date = date("d/m/Y h:i");
// ****** ATENÇÃO ********
// ABAIXO ESTÁ A CONFIGURAÇÃO DO SEU FORMULÁRIO.
// ****** ATENÇÃO ********
//CABEÇALHO - ONFIGURAÇÕES SOBRE SEUS DADOS E SEU WEBSITE
$w_company = "Creative Lawn Care and Landscape Design";
$w_malito = "[email protected]";
$w_owner = "Robert Barros";
$w_thankyoupage='thankyou.php';
/*
$w_headerfrom="From: $name <$email>\n";
*/
$w_headerfrom="From: <$email>";
$w_subjectfrom="$interest";
// FORMA COMO RECEBERÁ O E-MAIL (FORMULÁRIO)
// ******** OBS: SE FOR ADICIONAR NOVOS CAMPOS, ADICIONE OS CAMPOS NA VARIÁVEL ABAIXO *************
$w_txtfrom="
On: $date
Name: $name\n
Address: $address\n
CityZip: $cityzip\n
Email: $email\n
Phone: $phone\n
CallMe: $callme\n
StartOn: $schedule4\n
Interest: $interest\n
How Often: $schedule\n
Engine: $engine\n
Message: $details\n
";
//ENVIO DA MENSAGEM ORIGINAL
$headers = "$w_headerfrom";
$w_subject = "$interest";
$w_myemail = "$w_malito";
$w_msntxt = "$w_txtfrom";
mail($w_myemail,$w_subject,$w_msntxt,$headers);
//ENVIO DE MENSAGEM DE RESPOSTA AUTOMATICA
$w_subjectto = "$interest";
$w_headerto = "From: $w_company <$w_malito>\n";
$w_txtto ="Thank you for your inquire.\n\nWe respect your privacy and will only ever use your email to contact you about your request.\n\nI am going to get in touch with you in a few minutes.\n\nRegards,\n\nRobert Barros\nCreative Lawn Care n Landscape Design\n\nSent on: $date";
$headers = "$w_headerto";
$w_subject = "Re: <$interest>";
$w_msntxt = "$w_txtto";
mail($email,$w_subject,$w_msntxt,$headers);
echo "<script>window.location='$w_thankyoupage'</script>";
?>
I found this web site "http://www.soaptray.com/2008/04/validate-email-addresses-using-php/"
But I don't know how to use it in my form scrip. Should I call the function to validate from the index.htm or form.php
Some one please can help.
my www is www.creativelawnservice.com
following its my script:
<?php
date_default_timezone_set('America/Chicago');
$date = date("d/m/Y h:i");
// ****** ATENÇÃO ********
// ABAIXO ESTÁ A CONFIGURAÇÃO DO SEU FORMULÁRIO.
// ****** ATENÇÃO ********
//CABEÇALHO - ONFIGURAÇÕES SOBRE SEUS DADOS E SEU WEBSITE
$w_company = "Creative Lawn Care and Landscape Design";
$w_malito = "[email protected]";
$w_owner = "Robert Barros";
$w_thankyoupage='thankyou.php';
/*
$w_headerfrom="From: $name <$email>\n";
*/
$w_headerfrom="From: <$email>";
$w_subjectfrom="$interest";
// FORMA COMO RECEBERÁ O E-MAIL (FORMULÁRIO)
// ******** OBS: SE FOR ADICIONAR NOVOS CAMPOS, ADICIONE OS CAMPOS NA VARIÁVEL ABAIXO *************
$w_txtfrom="
On: $date
Name: $name\n
Address: $address\n
CityZip: $cityzip\n
Email: $email\n
Phone: $phone\n
CallMe: $callme\n
StartOn: $schedule4\n
Interest: $interest\n
How Often: $schedule\n
Engine: $engine\n
Message: $details\n
";
//ENVIO DA MENSAGEM ORIGINAL
$headers = "$w_headerfrom";
$w_subject = "$interest";
$w_myemail = "$w_malito";
$w_msntxt = "$w_txtfrom";
mail($w_myemail,$w_subject,$w_msntxt,$headers);
//ENVIO DE MENSAGEM DE RESPOSTA AUTOMATICA
$w_subjectto = "$interest";
$w_headerto = "From: $w_company <$w_malito>\n";
$w_txtto ="Thank you for your inquire.\n\nWe respect your privacy and will only ever use your email to contact you about your request.\n\nI am going to get in touch with you in a few minutes.\n\nRegards,\n\nRobert Barros\nCreative Lawn Care n Landscape Design\n\nSent on: $date";
$headers = "$w_headerto";
$w_subject = "Re: <$interest>";
$w_msntxt = "$w_txtto";
mail($email,$w_subject,$w_msntxt,$headers);
echo "<script>window.location='$w_thankyoupage'</script>";
?>