Web Hosting Talk







View Full Version : PHP Email Form


glenwheeler
02-10-2009, 09:56 AM
Hi Guys,
I am trying to find a php form for my website but do not want to go down the road of using GD and captcha. I require something as simple as a 2+2 area which will stop spamming on the website form. If anyone has a simple script for this could you please reply. I will be very grateful for any help.
Thanks Guys,
Glen

glenwheeler
02-10-2009, 12:04 PM
Anyone?
Thanks Guys.

HRDev Hady
02-10-2009, 12:31 PM
Do you want it to be random math problems or just 2+2. If you just want 2+2 do this:
$get = $_GET;
if($get['math_prob'] == '4') {
//send mail
} else {
//echo error
}

glenwheeler
02-10-2009, 12:58 PM
Hi Mate,
I am just looking for a piece of code to drop into my email form thats all...

HRDev Hady
02-10-2009, 01:48 PM
Oh, can you post your source and I'll edit it for you.

glenwheeler
02-10-2009, 01:54 PM
All i have at present is the basics mate which is;
<form
action="mailto:mail@myaddress.com"
method="POST"
enctype="multipart/form-data"
name="EmailTestForm">
Your Name:<br>
<input type="text" size="20" name="VisitorName"><br><br>
Your Comment:<br>
<textarea name="VisitorComment" rows="4" cols="20">
</textarea><br><br>
<input type="submit" value="Email This Form">
</form>
the very basic..

HRDev Hady
02-10-2009, 01:59 PM
No php yet? I'll code the php soon. I'm in class right now. Anything special you want on it?

glenwheeler
02-10-2009, 02:14 PM
No I aint got no php yet mate..it would be great if you could just code something up for me though, that would be excellent! I dont want anything fancy just a simple sum in the form so only human people can email..and not spam bots..

HRDev Hady
02-10-2009, 02:46 PM
Alright I should have it done in a lil.

glenwheeler
02-10-2009, 02:51 PM
Cool mate...i added you on AIM

HRDev Hady
02-10-2009, 05:08 PM
Alright I finished it. Here it is:
http://hr-development.net/hady/email/email.phps
If you have any problems just tell me and I will be glad to help!