Contact Form Help

Hi,

Recently I downloaded a template which is awesome. However, it has a contact form on it but no way to set it up easily. I’m wondering how I can use the code provided in order to make it send to my email address. I’m aware this’ll use PHP or something similar of which I have no idea how to use.

I’d like it to change the “Any spam will be ignored and deleted” text to “Your email has been sent successfully” or “Your email has not been sent successfully, please correct errors”. Any help would be much appreciated.

You can view the page here; http://chocants.co.uk/Home/ and the contact form is at the bottom of it.

CONTACT FORM CODE:

[code]


















[/code]

Without seeing all of the files and PHP code, it’s hard to help…

You will need a mail.php file that looks something like this.

[php]<?php
$to = "[email protected]";
$subject = “Test mail”;
$message = $_REQUEST[‘message’];

/* $message = “Hello! This is a simple email message from me.”;*/
$from = "[email protected]";
$headers = “From:”.$from;

/*
mail($to,$subject,$message,$headers);
echo “Mail Sent.”;
*/

$send = mail($to, $subject, $message, $headers);

/* if($send && $message != “”){

 header( "Location: http://www.yourdomain.com/thankyou.htm" ) ; }

else

{ header( "Location: http://www.yourdomain.com/problem.htm" ) ; }

*/

?> [/php]

Please keep in mind this is not specific to your form but it should do the trick once you modify it.

Sponsor our Newsletter | Privacy Policy | Terms of Service