Make a Contact form anti-spam working

I can't get this anti-spam .php code works, important note: the coding worked before I added the label/.php anti-spam code. The obvious flaws in the coding?

HTML:

< link rel = "stylesheet" href = "css/site-comments-part - two.php" type = "text/css" media = "screen" / >

< are method = "post" action = "site-comments-part - two.php" >

< label > name < / label >

< input name = placeholder 'Name' = 'type here' >

< label > Email * < / label >

< input name = "email" type = "email" placeholder = "Type here" >

< label > suggested Feedback * < / label >

< name textarea = placeholder "message" = "Type here" > < / textarea >

< label > what is (20 + 5) / 5? (Anti-spam) * < / label >

< input name = 'human' placeholder = "type here" >

< div > < input id = "submit" name = "submit" type = "submit" value = "Submit" > < / div >

< / make >

PHP:

<? PHP

$name = $_POST ['name'];

$email = $_POST ['email'];

$message = $_POST ['message'];

$from = ' from: Contact form ";

    $to = ' [email protected] ';

$subject = "site feedback";

$body = "from: $name\n E-mail: $email\n Message: \n $message";

If ($_POST ['submit']) {}

If (& & $human == '5') {}

If (mail ($subject, $body, $to, $from)) {}

echo "< p > your message has been sent! < /p > ';

} else {}

echo "< p > something went wrong, go back and try again! < /p > ';

}

} else {}

($_POST ['submit'] & & $human! = '5') {

echo "< p > you answered the anti-spam question wrong! This means that your message has not been sent < /p > ';

}

}

? >

Thanks for the help.

<>

$name = $_POST ['name'];

$email = $_POST ['email'];

$message = $_POST ['message'];

$from = ' from: Contact form ";

$to = ' [email protected]';

$subject = "site feedback";

$body = "from: $name\n E-mail: $email\n Message: \n $message";

{if (isset($_POST['submit']))}

If ($_POST ['man']! = 5) {}

echo '

You answered incorrectly the anti-spam question! This means that your message has not been sent

';

}

else if ($_POST ['man'] == 5) {}

mail ($ $subject, $body, $from);

echo '

Your message has been sent!

';

}

else {}

echo '

Something was wrong, go back and try again!

';

}

}

?>

Tags: Dreamweaver

Similar Questions

  • to make a contact form with several answers to checkbox clickable?

    Anyone know if there is a way to make a contact form where it may include several elements box people can tick, it would then send the form, and in the email it would show those who they checked and they don't? As something like... "Tell us which of these things you would like to learn more on" followed by a list of 10 things maybe they could check or not?

    If no fix third-party that would work inside the Muse that you think? Thank you

    Here are two images of example of a random site I found that was what my client is looking for

    Screen Shot 2014-11-10 at 10.16.08 PM.png

    Screen Shot 2014-11-10 at 10.15.58 PM.png

    Please see the links below:

    http://www.JotForm.com/help/99-adding-form-to-Adobe-Muse

    http://www.JotForm.com/help/25-setting-up-email-notifications

    Thank you

    Vikas

  • PHP contact form does not work

    I created my page using godaddy but my php contact form does not work. When sending a message, he won't have to the sent Message (su message to ha enviado) page, but it is not actually send any mails. The accounts are set up, but it does not work. The web page is cuysrus.com, the contact form is on the contact page.

    This is the code I used for the php class linked to the html file:

    <? PHP

    $to = " [email protected] "; "

    $subject = 'new message ';

    $nombre = $_POST ['number'];

    $apellido = $_POST ['apellido'];

    $message = $_POST ['message'];

    $headers = "from: ". " [email protected] \n";

    $headers. = "X-Mailer: PHP /'." phpversion();

    $headers. = "MIME-Version: 1.0\r\n";

    $headers. = "content-Type: text/html;" charset = iso-8859-1\n ";

    $retval = mail ($to $subject, $message, $headers);

    If ($retval == true) {}

    echo "message Su will ha enviado.

    } else {}

    echo "Vuelva a intentarlo.

    }

    ? >

    Well sorry that I forgot to ask about the action of form... you will need to rework this if you do not have to use the form of godaddy.

    a few things... first of all, you have the transformation code in the page, if you want that your action forms literally go anywhere.  ' change action = "? »

    Second, you'll need a 'trigger' in the form must be added a hidden as field

    Thirdly, finally, you have this block of code that I rewrote the process, if there is a request for 'process' then here is the code:

    <>

    form of process

    If (@$_REQUEST ['process']) {}

    $headers = "from: [email protected] \n";

    $to = "[email protected]";

    $subject = 'new message ';

    $body = "number:". "" $_REQUEST ['number']. »

    Apellido: ".." $_REQUEST ['apellido']. »

    Message: ".." $_REQUEST ['message']. »

    ";

    $retval = mail ($to $subject, $body, $headers);

    If ($retval == true) {}

    echo "message Su will ha enviado.

    } else {}

    echo "Vuelva a intentarlo.

    }

    }

    ?>

  • My contact form does not work, not even in business catalyst

    My contact form does not work, not even in BusinessCatalyst, need help so I need to work, my BusinessCatalyst site is http://foodtrucksdecolombia.BusinessCatalyst.com and it works in my own server which is www.foodtrucksdecolombia.com need

    I see what you mean now. Seems to be a problem with your phone field. Did you by chance change the email for a field phone field? I see that you do not have a field of electronic mail and an email field is required for the form to work. If I add an email to the contact number field, it works fine.

  • My 'contact' form does not work.  When I send a contact test she returned to my adobe email account this: 'Contact form' has a new form submission.

    My 'contact' form does not work.  When I send a contact test he returned this to my adobe email account:

    'Contact form' has a new form submission.

    What does not work exactly? As you said form submission notification is received in your e-mail account, so process form working I think but you want the notifications to go to another e-mail account, I think.

    Have you added the email address in the field "Email to" in shape options? If Yes and then also you do not receive the form, then please give me the url of the site and post a screenshot or a form with the open option box.

    Thank you

    Sanjit

  • What system use Muse to make the contact form widget work?

    Hello

    I'm a graphic designer working with a coder to create a new website using Muse. My coder was asked what Muse system uses to make the widget of the contact form.  Looking at the code of the page looks like ASP dot net and when the user clicks the button the form data is sent to a script called "FormProcessv2.aspx". If so what version?  (for example, ASP 1.0 or 2.0 or 3.0) Muse use "dot net" or ".NET" or similar in the documentation? If so then would you say what version (1.0 or 2.0)?

    Can someone help me with these questions?

    Thank you very much

    Emma

    It is unclear what the URL/code page you look at? Muse does not ASP. Muse uses PHP for form processing and relies on PHP sendMail to send the form as an e-mail information.

  • contact form does not work with certain email addresses

    My contact form was working fine until a few weeks ago, it won't work with the e-mail address I used. I tried different address some work, some don't, what gives here.

    For what I pay, I shouldn't have this problem.

    Please find a similar discussion here and try the above suggestion:

    http://forums.Adobe.com/message/6304524#6304524

    Thank you

    Sanjit

  • My contact form does not work. When you send a message, it never happens.

    WE use an email to the same address as the website, IE [email protected] and the site is johnblakecpa.com

    Is it not enough?

    For now, I removed the form, after complaints from customers.

    Contact forms need some 'PHP' processing on the server side.

    And using this verification to ReCaptcha can cause additional problems.

    I just checked with MacHighway, and they require a special action to let the html pages to go through this process.

    Pages with the normal "html" extension are not processed by default (only those with php are processed). Check out his page for assistance: How set PHP to parse files with the extension .html - knowledge base - MacHighway

    Another useful source is this page: Troubleshooting Muse form used on the servers of third party Widgets

    I hope this helps...

  • Blacknight hosting, contact form does not work

    Contact form Adobe muse doesn't send emails (not not showing error submission form but I do not receive messages) Please help, anyone has the solution?

    Hello Onlyforhelp,

    Please see the link below, I don't know that it will help you understand the root cause of the problem.

    Troubleshooting Muse form used on the servers of third party Widgets

    Kind regards

    Vivek

  • Is it possible to download photographs - in a contact form? How to make a contact form?-there is no download option!

    I'm creating a Web site for my clients where they can send me a contact form with the usual contact references and I also want to send me some pictures.

    I can't find the option for it to enter into the form.

    Is this possible?

    Thank you for responding!

    Hello

    Take a look at this topic,

    Download file button

  • How can I make my Contact form send the info to my email?

    Greetings! I this is a contact form that I have creaed with help, but I can't seem to send information to my email address after it is submitted. That is my biggest problem at the moment.

    Is a secondary question, can I do so once the form is submitted it send the info to my email without a page redirect?

    Thanks in advance!

    Change this:

    <>

    If ($_POST ['email']<>") {}

    $ToEmail = ' [email protected]';

    $EmailSubject = "BestMarketingNames.com survey";

    $mailheader = "from:". " $_POST ['email']. » \r\n » ;

    $mailheader. = "reply-To:". " $_POST ['email']. » \r\n » ;

    $mailheader. = "content-type: text/html;" charset = iso-8859-1\r\n ";

    $MESSAGE_BODY = "fullame:". " $_POST ['name']. » « ;"

    $MESSAGE_BODY. = "e-mail:". " $_POST ['email']. » « ;"

    $MESSAGE_BODY. = "phone number:".nl2br($_post["phone"])." « ;"

    $MESSAGE_BODY. = "BestTime:". " $_POST ['besttime"]. » « ;"

    $MESSAGE_BODY. = "PriceToStayUnder:". " $_POST ['price']. » « ;"

    $MESSAGE_BODY. = "Comment:".nl2br($_post["comment"])." « ;"

    mail ($EmailSubject, $MESSAGE_BODY, $ToEmail, $mailheader) or die ('Failure');

    ?>

    Thank you for your inquiry. A company representative will contact you within the next 72 hours!

    <>

    } else {}

    ?>

    to do this:

    <>

    If ($_POST ['email']<>") {}

    $ToEmail = ' [email protected]';

    $EmailSubject = "BestMarketingNames.com survey";

    $mailheader = "from:". " $_POST ['email']. » \r\n » ;

    $mailheader. = "reply-To:". " $_POST ['email']. » \r\n » ;

    $mailheader. = "content-type: text/html;" charset = iso-8859-1\r\n ";

    $MESSAGE_BODY = "fullame:". " $_POST ['name']. » \n";

    $MESSAGE_BODY. = "e-mail:". " $_POST ['email']. » \n";

    $MESSAGE_BODY. = "phone number:".nl2br($_post["phone"])." \n";

    $MESSAGE_BODY. = "BestTime:". " $_POST ['besttime"]. » \n";

    $MESSAGE_BODY. = "PriceToStayUnder:". " $_POST ['price']. » \n";

    $MESSAGE_BODY. = "Comment:".nl2br($_post["comment"])." \n";

    mail ($EmailSubject, $MESSAGE_BODY, $ToEmail, $mailheader) or die ('Failure');

    ?>

    Thank you for your inquiry. A company representative will contact you within the next 72 hours!

    <>

    } else {}

    ?>

    -ST

  • Contact form does not work

    I just uploaded my Muse site at gate.com to host and everything works well except the contact page.  From what I see on the forum, it seems to be a common problem.  Does anyone have experience working with gate.com?  I contacted them and they keep telling me that their php configurations seem to be right.  I don't know anything about the code or html (so the Muse), but I get this error message from Muse when I download (warning, an unexpected response to the PHP application.  PHP cannot be configured correctly on your web server.  Contact your Web host or Web site administrator on how to configure the PHP support). 

    I tried to use the suggestion of Adobes to go to http;//my-site.com/scripts/form_check.php to give gate.com of diagnostic aid, but all I get is this message (NOT FOUND the requested URL/scripts/form_check.php was not found on this server).

    I spent a lot of time trying to get this fixed and can't seem to get anywhere.  Can anyone offer some suggestions?

    Thank you.

    I host with GoDaddy and I get this same error whenever I download. The forms are always good work.

    I noticed that the Yahoo email addresses don't work with forms of the good Muse, so I recommend that my clients use different emails.

  • Please, I need help! my contact form no longer works

    My client called to tell me the form on his site (or at least "submit it" has stopped working. I'm too new at this to understand.

    Here is the link:

    http://www.hickersonbrothers.com/Contact_us/contact_hickerson_brothers_electric.php

    Anyone know what I need to do? Thank you in advance.

    Jeff

    Ask your host where form to e-mail script transformation you can use.   Some hosts are preinstalled scripts on the server.  If your host doesn't have a script, you can use, know your server supports what scripting languages (PHP, ASP, Perl, etc...)  This will determine what type of script, you must find.

    If your server supports PHP, this DB Master formm@ailer script is very good.  It has built in spam prevention and it hides the email address of fishermen.

    http://dbmasters.NET/index.php?ID=4

    Tektite
    http://www.tectite.com/formmailpage.php

    Forms to go of Bebosoft (script generation software)
    http://www.bebosoft.com/products/FormsToGo/overview/

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • my contact form does not work.

    What is a support number, so I can get someone on the phone. It's thoroughly to go there.

    You can contact support by chat or call team:

    https://helpx.Adobe.com/in/Muse.html

    Thank you

    Sanjit

  • Contact form does not. PHP

    Hello

    My contact form doesn't work and its probably a easily the solution to this. Help, please

    Sarah

    HTML:

    < do action = "mail.php" method = "POST" > "

    < div class = "row 50%" >

    < div class = "6u 12u (mobile)" > < input type = "text" name = placeholder 'name' = "Namn" / > < / div >

    < div class = "6u 12u (mobile)" > < input type = "email" name = "email" space reserved = "Email" / > < / div >

    < / div >

    < div class = "row 50%" >

    < div class = "12u" > < textarea name = "message" = "Meddelande" placeholder lines = "6" > < / textarea > < / div >

    < / div >

    < div class = "row" >

    < div class = "12u" >

    < ul class = 'actions' >

    < li > < input type = "submit" value = "Skicka Meddelande" / > < /li >

    < /ul >

    < / div >

    < / div >

    < / make >

    PHP:

    <? PHP $name = $_POST ['name'];

    $email = $_POST [' [email protected] *'];

    $message = $_POST ['message... »] ;

    $formcontent = "" from: $name \n Message: $message ";"

    $recipient = "... @gmail.com;

    $subject = "contact form";

    $mailheader = "from: $email \r\n";

    mail ($subject, $recipient, $mailheader, $formcontent) or die ("Error!");

    header ("Location:http://www...se");

    ? >

    Make sure that the configured php code corresponds EXACTLY with your entry of the form name. For example, your entry form for Namn is name = 'name', while in the php code its $name = $_POST ['name']; (with a capital 'n')-the same goes for "message" and you have a little... after it - $message = $_POST ['Message... ". »] ;

    $email = $_POST [' [email protected] *'];

    $message = $_POST ['message... »] ;

    $formcontent = "" from: $name \n Message: $message ";"

    $recipient = "... @gmail.com;

    $subject = "contact form";

    $mailheader = "from: $email \r\n";

    mail ($subject, $recipient, $mailheader, $formcontent) or die ("Error!");

    Header ("Location:http://www...se");

    ?>

Maybe you are looking for