Question by Robert B: HELP – HELP WITH .Php?
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:
\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 “window.location=’$ w_thankyoupage'”;

?>

Best answer:

Answer by Jason
can this b any longer

Add your own answer in the comments!

3 thoughts on “Q&A: HELP – HELP WITH .Php?”

  1. Yes, you can shorten this script greatly.
    Secondly, sinply have:
    if($ variable!=””){…}
    then if it is blank, send them back. Simple conditioning…

  2. You don’t speak Portuguese, do you?
    That script is probably from Brasil.

    Go to http://www.web2coders.com anbd download the “Form to email” free script. That is an easier one…
    Wait this afternoon (it is 0800 here), and I shall expand that form with a direct javascript validation.
    (You do not validate a form only in php: it is already too late: you validate it first in javascript, before sending it. You do further validation then).

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.