- Mar 22, 2013
- 9,144
- 10,489
I have an old HTML website, and I'd like to add the ReCaptcha to the contact form, because some crypto spammer asshole keeps spamming me with his stupid trading bot or whatever.
This is the contact form:
index.php (it's not all the code, just what's relevant)
contactprocess .php
https://www.codepile.net/pile/JnKJ4weR (im posting this link where you can find the code, because Blackhatworld is being a dildo and won't let me post the actual code here)
I managed to add the ReCaptcha box by adding these in index.php (it's not shown in the code above, but I know how/where to add these):
https://www.codepile.net/pile/qnbObW5p (sharing this link because BHW dildo)
But the ReCaptcha box needs to somehow connect to the submit button, to do the validation. I don't know how to do that, but I'm pretty sure code needs to be added to contactprocess.php
Here are 2 tutorials that may be of help to help you help me kinda thing:
https://www.bronco.co.uk/our-ideas/how-to-add-google-recaptcha-to-a-form-phphtml/
https://yourblogcoach.com/how-to-add-google-recaptcha-in-php-contact-form/
If anyone can help, would be great. Thanks : )
This is the contact form:
index.php (it's not all the code, just what's relevant)
HTML:
<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
https://www.codepile.net/pile/JnKJ4weR (im posting this link where you can find the code, because Blackhatworld is being a dildo and won't let me post the actual code here)
I managed to add the ReCaptcha box by adding these in index.php (it's not shown in the code above, but I know how/where to add these):
https://www.codepile.net/pile/qnbObW5p (sharing this link because BHW dildo)
HTML:
<div class="g-recaptcha brochure__form__captcha" data-sitekey="YOUR SITE KEY"></div>
But the ReCaptcha box needs to somehow connect to the submit button, to do the validation. I don't know how to do that, but I'm pretty sure code needs to be added to contactprocess.php
Here are 2 tutorials that may be of help to help you help me kinda thing:
https://www.bronco.co.uk/our-ideas/how-to-add-google-recaptcha-to-a-form-phphtml/
https://yourblogcoach.com/how-to-add-google-recaptcha-in-php-contact-form/
If anyone can help, would be great. Thanks : )
Last edited: