- Joined
- Jun 5, 2019
- Messages
- 209
- Reaction score
- 21
- Points
- 53
I have an outdated HTML website and I would like to incorporate ReCaptcha into the contact form. I am experiencing issues with a cryptocurrency spammer who is sending me spam messages through the contact form. Below is the contact form code from the index.php file (not the entire code, only the relevant section).
contactprocess .php
The PHP file responsible for processing the contact form is named "contactprocess.php." I am unable to post the actual code here because of restrictions on Mmolearn, so I am sharing a link to CodePile, where the code can be found.
I have succeeded in integrating the ReCaptcha box by inserting specific code into the index.php file (which is not displayed in the above code, but I know the appropriate location to add the code). Here is the link to the code on CodePile https://www.codepile.net/pile/qnbObW5p
However, the ReCaptcha box must connect to the submit button in order to perform validation. I am unsure how to accomplish this, but I believe code must be included in the contactprocess.php file.
I have located two tutorials that may be beneficial in assisting you in aiding me:
If anyone is able to provide assistance, it would be greatly appreciated. Thank you.
<div style="float: right;"><form action="contactprocess.php" method="post" name="freecontactform" id="freecontactform" onsubmit="return validate.check(this)">
<table width="550" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" style="font-weight:bold;">Your Name:</td>
</tr>
<tr>
<td valign="top" class="formtd"><input name="Full_Name" type="text" class="formtxt" id="Full_Name" /></td>
</tr>
<tr>
<td valign="top" style="font-weight:bold;">Your Email Address:</td>
</tr>
<tr>
<td valign="top" class="formtd"><input name="Email_Address" type="text" class="formtxt" id="Email_Address" maxlength="100" /></td>
</tr>
<tr>
<td valign="top" style="font-weight:bold;">Your Message:</td>
</tr>
<tr>
<td valign="top" class="formtd"><textarea name="Your_Message" class="formtxt" id="Your_Message" style="height:160px" maxlength="2000"></textarea></td>
</tr>
<tr>
<td><input name="AntiSpam" type="hidden" id="AntiSpam" value="25" maxlength="100" />
<div class="checkout"><a href="#" onclick="document.forms['freecontactform'].submit();">Send Message</a></div></td>
</tr>
</table>
<p> </p>
</form></div>
contactprocess .php
CodePile | Easily Share Piles of Code
CodePile is a simple, powerful, collaborative code sharing hub, designed to make sharing and working on code together easy, beautiful, and interactive.
www.codepile.net
The PHP file responsible for processing the contact form is named "contactprocess.php." I am unable to post the actual code here because of restrictions on Mmolearn, so I am sharing a link to CodePile, where the code can be found.
I have succeeded in integrating the ReCaptcha box by inserting specific code into the index.php file (which is not displayed in the above code, but I know the appropriate location to add the code). Here is the link to the code on CodePile https://www.codepile.net/pile/qnbObW5p
<div class="g-recaptcha brochure__form__captcha" data-sitekey="YOUR SITE KEY"></div>
However, the ReCaptcha box must connect to the submit button in order to perform validation. I am unsure how to accomplish this, but I believe code must be included in the contactprocess.php file.
I have located two tutorials that may be beneficial in assisting you in aiding me:
How to add Google reCAPTCHA to a Form (PHP/HTML)
When you need to add a relatively simple new feature like this, if you’re anything like me, you don’t want to be reading through pages and pages of documentation; you want an example you can implement quickly then edit as …
www.bronco.co.uk
How to Add Google reCAPTCHA in PHP Contact Form? - YourBlogCoach
Add google reCAPTCHA in contact form or any other form using the PHP. Generate google reCAPTCHA API keys and integrate with website and forms.
yourblogcoach.com
If anyone is able to provide assistance, it would be greatly appreciated. Thank you.