Jump to content

Contact Form


debmc99

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.

Link to comment
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

Link to comment
Share on other sites

  • 5 months later...
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.

Link to comment
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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...