Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > RocketCake
Secure Contact Form

rickowens
Registered User
Quote
2021-12-21 17:25:26

New user here: Is there an easy way for non-coders like me to make the RC contact form secure? I just designed/published mine last night and have already received over 20 spam submissions.

My contact form: https://postalemployeenetwork.com/contact2.php

Thanks


erik
Registered User
Quote
2021-12-22 06:51:24

I'd do it like that: Put another edit box into your contact form, and write a text in front of it like this:

Enter "hello" in here, to verify you are not a spam bot

Name that input "antispam"

And then, use this code (with your own email replaced of course):

$text = "";
foreach($_POST as $name => $value)
{
$text .= "$name : $value\n";
}

if ($_POST['antispam'] != "hello")
{
echo 'Wrong anti-spam field.';
}
else
if ($text != "")
{
echo 'Thanks for contacting us.';
mail("youremail@example.com", "Contact form request", $text);
}



rickowens
Registered User
Quote
2021-12-22 15:23:08

Thank you - will do.


rickowens
Registered User
Quote
2021-12-22 16:34:09

erik - I must be doing something wrong. Now the phrase "Wrong anti-spam field." shows up on my contact page even before I test the form.


raimcomputi
Registered User
Quote
2021-12-22 17:01:23

I can only recommend using a professional script that has several anti-spam filters built into it. Otherwise you won't get any rest. Not only is it flooded with spam, it's just a matter of time before your form is misused to send spam to other people. Then at the latest you will have problems with your email provider.

You can take a look here to see what a sensible and spam-proof contact form can look like: https://www.werde-wach.de/verwal...

Raimund


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "I?ternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact