473,396 Members | 1,775 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Get rid of reCaptcha fields in emails

4
How do I get rid of reCaptcha fields that are emailed when I submit a form? I guess what I am asking is how do you exclude unwanted fields from being posted to email from a form in PHP?

Thanks,
Kenny
Apr 4 '08 #1
3 1830
TheServant
1,168 Expert 1GB
Had to look up reCaptchas, I thought they were the same as Captchas! Anyway, Do you have the form code etc? It sounds like it's not your form and you're trying to bypass some information sending. My apologies if I'm wrong.

But give up some code to work with and we can help! Just remember to follow the posting guidlines and use the correct code tags for your code.
Apr 4 '08 #2
KHurst
4
This the code I use to build my email message body:

[PHP]//Build Message Body from Contact Form
foreach ($_POST as $Field=>$Value)
//Check for NOT Empty Fields
if(!empty($Value)) {
$MsgBody .= "$Field: $Value\n";
}[/PHP]




This is the body content of the sent email. At the bottom are the reCaptcha fields that I do not want to send:

First_Name: John
Last_Name: Doe
Gender: Male
Street_Address: 100 Main St.
City: Hometown
State: DC
Zipcode: 12345
Address_Private: Yes
Birthday: 07-04
recaptcha_challenge_field: 024rRIIuoLSg5yoYQ1gh-loK6u9JgTum-hvx34oRZcFbFBOGYjVWksaPIU_0NF1WedQGckwvgmZO2uBUVlw joSWZQxuuHzaJebbTYjyKesJudQZ75_2f2X_HkSrJsrq8cF8d4 gYE-l1G--pQynj-zqMgAnOw2OhMzzQxiiVyLN5vVl98djvDFrvJDNgas26Kf4T-hlHwIC
recaptcha_response_field: unemployedto
Apr 4 '08 #3
ronverdonk
4,258 Expert 4TB
Set the key names you want to exclude in an array and check the existence of each key in that array. So when a key is not in that array and the value is not empty, then construct the message, i.e.[php]$Excludes=array('recaptcha_challenge_field','recap tcha_response_field');
//Build Message Body from Contact Form
foreach ($_POST as $Field=>$Value) {
//Check for allowed and NOT Empty Fields
if(!in_array($Field, $Excludes) AND !empty($Value)) {
$MsgBody .= "$Field: $Value\n";
}
}[/php]Ronald
Apr 4 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Rick Thiel | last post by:
Hello, I am trying to build a Crystal report VisualStudio.NET for an ASP.NET application. I would like to build a report that doesn't connect to any particular database at design time because I...
5
by: Gordon Youd | last post by:
Randy Harris and Bob Quintal have tried to help me with my data base report problem, for which I thank them. The suggestions they gave me still do not seem to work and I am still getting false...
4
by: philip.spinks | last post by:
Hi I am a novice at Access (2002) and I need some help. I want to use a query to interrogate a memo field which contains the body of an email but despite help with the syntax etc. I can not get...
0
by: =?Utf-8?B?Q2hhcmxlcw==?= | last post by:
Like many people, I normally use Yahoo! Mail via the web and like to keep all my emails stored on the Yahoo! server. However sometimes I can’t get access to a PC/the web and I download my emails...
2
by: Sebarry | last post by:
Hi, Has anyone used this successfully in PHP to prevent spam mails sent from HTML forms? I've added it to a form of mine and it seems a bit hit and miss. I incorrectly enter the captcha and it...
1
by: dineshkaku | last post by:
Does anyone know any codes for live validation of the recaptcha? My registration process is full of live validations and the register buttin does not get activated unless all fields are error free....
10
by: Linda Jimerson | last post by:
Hello - Thanks for any help you can provide. Below is code I am using for "recaptcha" form validation. It works well EXCEPT that (instead of echoing 'You got it!') as shown below when the accurate...
1
by: Subcomandante | last post by:
Hi, Did anyone try and succeeded to defeat reCAPTCHA script?
2
ram09
by: ram09 | last post by:
Hi All, I have a contact-us form in my asp.net website and I want to prevent spamming without using a recaptcha. Is there any way or technique where I can prevent people from playing/spamming in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.