debmc99 Posted January 26, 2010 Report Posted January 26, 2010 My client's contact form is being hijacked by spam and automatic submissions. The form is processed with PHP. Does anyone know a simple way to add an anti-spam "are you human" type question to the HTML form? I also read somewhere that you can prevent form comments from containing hyperlinks. Does anyone happen to know what the code would be for that? Any advice would be appreciated. Quote
administrator Posted January 26, 2010 Report Posted January 26, 2010 My client's contact form is being hijacked by spam and automatic submissions. The form is processed with PHP. Does anyone know a simple way to add an anti-spam "are you human" type question to the HTML form? I also read somewhere that you can prevent form comments from containing hyperlinks. Does anyone happen to know what the code would be for that? Any advice would be appreciated. Hi, This has been discussed before ... check out this thread on preventing spam. Stefan Quote
debmc99 Posted January 26, 2010 Author Report Posted January 26, 2010 Thank you - sorry I missed the earlier post. Quote
administrator Posted January 26, 2010 Report Posted January 26, 2010 No worries. I can't find half the stuff myself! Stefan Quote
ismail74 Posted July 11, 2010 Report Posted July 11, 2010 Hello, I noticed that html form can be sent to email through php or ant other langauge. Or, using Mailto function Is there any way we can send the form straight to my email (propably with attachment) using only html ? Mohammad Thanks Quote
falkencreative Posted July 11, 2010 Report Posted July 11, 2010 I noticed that html form can be sent to email through php or ant other language.Or, using Mailto function Is there any way we can send the form straight to my email (propably with attachment) using only html ? No, you'll have to use a server-side language like PHP or ASP.NET -- it can't be done with only HTML. Quote
ismail74 Posted July 12, 2010 Report Posted July 12, 2010 Thank you, OK, exactly as in the videos, i did these two files, but the variables don't seem to have worked or recognized?? THE FIRST FILE IS "form.php": <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTNL 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'>http://www.w3.org/TR/html4/loose.dtd"> <html><head> <title>Professional Web Design</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body><form method="post" action="form_response.php"> First Name: <br> <input name="name_first" type="text" size="50" maxlength="200"> Email: <br> <input name="email" type="text" size="50" maxlength="200"> <input type="submit" name="submit_button" value="Submit Request >>" class="submit"> </form></body></html> AND THE SECOND FILE IS "form_response.php": <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTNL 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head> <title>Professional Web Design</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <?php $first_name = $_post['name_first']; $email = $_post['email']; $email_message = "First name: {$first_name} with an email of: {$email}"; mail('ik4444@hotmail.com', 'Form Response ', $email_message); print "Thank you {$first_name} for your email {$email}"; ?> </body></html> the message was printed and emailed without the variables. Any help??? Thank you Quote
falkencreative Posted July 12, 2010 Report Posted July 12, 2010 $first_name = $_post['name_first'];$email = $_post['email']; Make sure you are using "$_POST" (all uppercase). I believe that should fix your problem. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.