Jump to content

Verification of Contact Form


Ultrakd

Recommended Posts

I am using the contact form PHP from Tutvid.com. But he doesnt show how to make a varification image or none of that. On my site I have an image but I dont have it coded properly to not allow the email to be sent unless it is properly typed in. In other words on my contact form you can type anything in and it will send it. Help Please!!

Link to comment
Share on other sites

Here is a pretty fair Captcha script tutorial that uses the GD library to create the images.

Well explained in the Tutorial.

 

http://www.trap17.com/forums/Simple-Php-Captcha-Image-Validation-t45058.html

 

Also, check the Logic for the email script. Follow along to see what happens or should not happen if the Captcha is correct/wrong.

Link to comment
Share on other sites

Here is a link to my contact page http://www.geckogeeks.com/HTML/contact.html. I started using the spry text areas I think this might fix the problem.

 

Here is my PHP script for it.

<?php

/*Subject and Email Variables*/

   $emailSubject = 'Customer Has a Question!';
   $webMaster = 'info@geckogeeks.com';

/* Gathering Data Variables*/

   $reasonforemailField = $_POST['reasonforemail'];
   $nameField = $_POST['name'];
   $emailField = $_POST['email'];
   $questionsField = $_POST['questions'];
   $geckoforumsField = $_POST['yes'];
   $searchengineField = $_POST['yes'];
   $breederField = $_POST['yes'];
   $otherField = $_POST['yes'];

   $body = <<


Reason for Email: $reasonforemail 

Name: $name 

Email: $email 

Questions: $questions 

Gecko Forums: $geckoforums 

Search Engine: $searchengine 

Breeder Reccomendation: $breeder 

Other: $other 

EOD;

   $headers = "From: $email\r\n";
   $headers .= "Content-type: text/html\r\n";
   $success = mail($webMaster, $emailSubject, $body, $headers);

/* Results rendard as HTML*/

   $theResults = <<
EOD;
echo "$theresults";

?>

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...