Jump to content
Killersites Community
debmc99

Contact Form

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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 >&gt" 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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×