Add the Contact form spam Protection

I'm not sure where to add the following lines of code to make this time 24 spam protection work, could I have a helping hand, thanks.

/ * Check if the cookie has been set * /.

If (isset($_COOKIE['FormSubmitted']))

{

/ * Sets a cookie to prevent the mail be sent again by 24 hours * /.

setcookie ('FormSubmitted', '1', time () + 60 * 60 * 24);

Php coding:

<? 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 (isset($_POST['submit']))}

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

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

}

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

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

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

}

else {}

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

}

}

? >

I always suggest using indenting in your code, as you nest IF / ELSEIF several levels.  I find the code difficult to read when you nest more than 2 levels, so it is best to achieve the same using a flag. I find much more readable:

<>
$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";
$error = false

/ * Check if the cookie has been set * /.

If (isset($_COOKIE['FormSubmitted'])) {}
echo '

You have already sent a message, please wait one hour before submitting another

';
$error = true
}

/ * Check if the man * /.

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

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

';
$error = true
}

If! $error {}
/ * Sets a cookie to prevent the mail be sent again by 1 h * /.
setcookie ('FormSubmitted', '1', time () + 60 * 60 * 1);

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

Your message has been sent!

';

}

?>

Tags: Dreamweaver

Similar Questions

  • Add the contact form with drop down

    How can we add a contact form with the drop in muse

    Use this free widget. It works very well!

    https://widgets.Mu/se/FormsPlus

  • Having problems with spam on the contact form

    I typed what one to have Adobe remove so I could type all of this once again to submit it in time. So, this will be the shorter version.

    Basically I get spam from the contact form on a page cataylst hosted non-commercial (hosted by bluehost). I have 35 other muse not sites on other systems and in 8 years never received a spam message. Now with Muse I get several a week only after a few months to live. If something goes really. Adobe has been no help and basically told me they can only help if it's the cataylist Business.

    Have you guys found any ways around that? I know that wordpress sites have apps to add to help him, but I didn't know if Muse was something like this, or code that could be entered to help him. I'd avoid CAPTCHA if humanly possible because I think that they look horrible on the websites and I also want low barriers for customers as possible to present real contacts.

    All thought is appreciated. Thank you

    Refer to Zak response to your similar post here - http://forums.adobe.com/message/6129694#6129694.

    Thank you

    Vinayak

  • Is it is possible to add script in Adobe Muse? I have added the functionality to export file .csv to the contact form

    Is it is possible to add script in Adobe Muse? I have added the functionality to export file .csv to the contact form

    Hi Vicky,

    Yes, you can add scripts customized to a page of muse. To do this, you must go to 'properties-> metadata-> html to head page' or ' object-> insert html.

    - Abhishek Maurya

  • Can not get the contact form to work

    Hey DW'ers.

    I have a (non-commercial) staff page and want to add a form accessible only via a tab "Contact us" in the navigation bar, which means there is no contact info anywhere link elsewhere on the site. I have the main contact page (the one they want when they click on the tab 'Contact us' in the navigation bar) registered under contact.html. Am I supposed to save only one page under contact.php?

    I don't expect a ton of emails since this is a hobby/personal site so maybe I'm trying to 'cheat' a little by adding the code pre-made. Is this a bad idea?  I should just form join us DW tool? I love this design simple http://www.html-form-guide.com/contact-form/creating-a-contact-form.ht ml but it doesn't seem to be an html form, it seems to be PHP. I contacted my host and they support php - they said to put the php script in my public_html folder I did, but that didn't work. What is the best way (even once, I don't expect much emails) to add a contact form?

    Thank you.

    Chris

    Let's break things down a bit.

    (1) HTML forms do nothing.  They're just a form with fields and a "submit" button.

    (2) in order to collect data and send them to your e-mail address requires a script (PHP).

    (3) the script can be integrated into your form HTML and SavedAs page contact.php.

    (4) or you can use contact.html and point the action attribute of the form to a separate PHP file.

    action="path-to-form-on-server/form-to-email-script.php" >. "

    Any script that you use, make sure it's safe and has spam prevention & other safeguards built in.  Sites the same hobby can be exploited by hackers, bots and spammers.

    FormM@ailer PHP Master DB
    http://dbmasters.NET/index.php?ID=4
    FormToEmail.com (free & pro versions available)
    http://FormToEmail.com/formtoemail_pro_version.php
    Tektite
    http://www.tectite.com/formmailpage.php
    Forms to go of Bebosoft (script generation software)
    http://www.bebosoft.com/products/FormsToGo/overview/
    Wufoo.com (online service)
    http://Wufoo.com/

    Nancy O.

  • Change of destination for the Contact form email

    Hi all

    I configured my portfolio page and was delighted to learn that you could add a form of contact rather than having to reveal your email address in the world. It is just an issue.


    The email address that I use for my Adobe ID is not my main job email, I use a secondary address. Whenever I created the contact form he began to send emails to my secondary address, when in fact, I want that they arrive in my Inbox from hauptwerk.


    I changed my Adobe ID to my primary address to see if it works, but no joy. emails are always landing in the wrong Inbox.

    My question: is some way you can change your email address for portfolio Adobe so that submitted emails a contact form come in a different Inbox?

    Thank you

    Angus

    Hey Angus! You can change the e-mail address that you want to use by following these steps:

    1. place the cursor on the contact form and click on the pencil icon that appears in the upper left corner

    2. click on customize

    3. then click on the Options tab of the form

    4 change email address

    5 valve

  • Attach text Yes/No boxes in the Contact form

    How can I add text to a contact form which will be yes/no boxes that go hand in hand? For now I have questions in plain text format, but since they are not part of the contact form, I do not think this information we will roll to the e-mail that I receive when someone clicks on the submit button.

    Yes, I figured out how to add a checkbox for the widget field and changed "label of the box" or not. But I want to know how to ensure that the question associated with the YES / no checkboxes should be included in the notification of form submission. I guess a text box gross will not be included in the notification of form submission, so is it possible to add text without a field of text associated with a contact form?

  • How can I add a contact form / form of feedback on my site?

    Is there a way to create forms in Muse? Or is there the widgets that can create forms?

    While it is not yet taken native support for web forms in Muse (they are on our roadmap), there are workarounds until we get there. Dani has created a Rough Cut video on how to add a contact form to your Muse site using Business Catalyst. Go to our list of past events of Jam Sessions http://www.adobekb.com/events.html#past and watch the session Adding Contact Forums :

    Users have also reported success adding forms of contact on their website with the help of Adobe FormsCentral, Jotformor Wufoo and inserting them by object > insert HTML code.

    Post edited by: Corey@Adobe
    (Link deleted AdobeTV and link added to the archives of the Jam session)

  • IP address in the contact forms

    I realized the contact forms created in Muse when e-mailed automatically contains the IP address of the user. Because of the laws on the confidentiality of the data, we do not want the IP address to be transmitted. It's showing us the incoming mail:

    "Von ubermitteltes Formular Web site: www.xxx.de .

    "Visitor IP address: xxx".

    How can we prevent the contact form or email generated to transmit the IP address of the user?

    It's a thing, what you need to do your company is something completely different, if you say here, 'it is not legal. Normally the IP address is very important information to identify the sender.

  • Image verification is received no error on the Contact form

    I get an error when you try to submit the contact form on my new Web site. It was built in Muse and is hosted in Business Catalyst. I use the Captcha of BC but get this error "error: an error has occurred." The image verification failed. If you think this is incorrect, please contact your administrator system or go back and submit the form. "I tried to resubmit the form several times, but continue to make the same mistake. The URL is www.gilbertsongaragedoors.com/contact.html. Help, please! I checked the settings on the screen in Muse, but everything seems to be correct. I'm not very familiar with Java script therefore am not able to check for errors there. The site was built using a Musegrid.com template. All my other forms seem to work well.

    Hi Shannon - the problem persists? I have sent the form and it was as expected.

    Thank you

    Mihai

  • The contact form question

    Recently created a new site, but the contact form is back with errors when downloading.

    1 WARNING

    PHP mail can be disabled or misconfigured web server. These forms can not send email. Contact your Web host or administrator of the Web site on the correct configuration of PHP mail.

    • I checked the site to another host and it works fine,
    • The host of to this Web site is responsible is nearly host
    • I'm currently in talks with support here but not get anywhere quickly.
    • I looked on the forum found pieces of the info, but nothing to solve this problem.
    • I've updated the nearly host php to version 5.6

    Can anyone help?

    Kind regards

    Grant

    Hey Grant,

    Please refer to the troubleshooting doc for the widget of forms used on third party widgets: Troubleshooting Muse form used on the servers of third party Widgets

    If we run the diagnostics, the results we get are:

    Kind regards

    Akshay

  • I just uploaded my site. But more often with success, for one thing: there is an error message on the contact form. "The server has encountered an error." It's pretty generic, so I don't know why. I checked my page, everything looks good. Ideas?

    I just uploaded my site. But more often with success, for one thing: there is an error message on the contact form. "The server has encountered an error." It's pretty generic, so I don't know why. I checked my page, everything looks good. I understand that the authorized "bug" before using the Contact form only with the catalyst has been fixed, so it must go through the fine. Ideas?

    Please consult this document:

    https://forums.Adobe.com/docs/doc-3581

    Thank you

    Sanjit

  • Emails generated by the Contact form widgets say they come to me rather than the person who generated the email?

    Can I change the emails generated by the Contact forms to say they come from me, to the address of the person who actually generated the request on the contact form? Or is it always automatically a link to my creative cloud account because that's how I'm hosting of Web sites?

    Because they come from you (at least from your account)... This is the account which uses the Web site to send the form to your email, which means that a user visits your Web site can send you this email "SAME" when they have not an e-mail account themselves.

    No, you cannot legialy change the address to theirs... that's a big no, no, in most of the country, but you can and should have a field of 'contacts' on your form that allows people to give you an email or phone number so that you can follow to the top.

    p.s., many people make the mistake of trying to force the contacts to mail in their forms and this offen feedback rounds people in addition to their use if they MUST tell you the color of their underware just to contact you about an offer of sale or the simple question then don't expect to get a large part of your forms.

  • How can I email the contact form outside of Business Catalyst?

    I try to use the Muse and send the contact form, but not use Business Catalyst.  Any suggestions?

    Hello

    You can use your online form, with all other hosts. Please click the link below to see how you can use the webform widget

    Adobe help Muse | Work with the shape of Widgets

    Let me know if you have any question.

  • Problems with the contact form

    Good day to you all,.

    im a total newbie-muse.

    That said: I have some problems with a contact form I've tried to insert into my homepage.

    When I try to download it via ftp to our server muse tells me that there are some problems with the configuration of PHP.

    In addition to the contact form, the site works very well.

    I tried to change the version of php on our server at 5.6, but it still doesn't work.


    Any ideas?

    Thanks in advance and greetings from the Germany.

    You can consult this document: Troubleshooting Muse form Widgets used on the third... | Adobe Community

Maybe you are looking for

  • Custom compressor not in FCPx settings

    When you try to add a new Destination in FCPx, 'Custom' folder of the compressor 0 shows presets, however I have several in this folder.   How can I make them appear as Destinations?  I spent several hours trying to have them appear. Thank you Geoff

  • How can I increase the distance of each step market health app

    The distance of each market stage is set too short, how can I expand this to 83cm?

  • Pavilion touchsmart 15 l: enter the administration password or power on password

    Powered on my computer and got this messageEnter the administration password or power on passwordEntered the password in wrong 3 times and got this number61704252Help please!

  • Defrag Win 7

    Can't run Defrag on laptop Win 7 (64-bit). PC says that this task is controlled by an another ap, who is not named. How do I know if defrag is necessary or whether it has even run?

  • Problem with the web service call

    I use ajax with json to call webservice but its not working with the localhost url in the emulator of the ripple. If I use an ip address or external url does not call the webservice. I also tried with BlackBerry, webservice does not. can someone guid