LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » Blogspot / Blogspot Tricks / HTML Codes / HTML-CSS-PHP-JavaScript / PHP Codes / Website / Website Tips » How To Create An HTML Working Contact Form For Your Blog & Website

How To Create An HTML Working Contact Form For Your Blog & Website

How To Create An HTML Working Contact Form For Your Blog & Website

You Don’t Have Need To Any Contact Form Builder Or Provider.

Here Are The Simple & Easy Step To Do.


This Tutorial Will Teach You How To Create A Very Simple Contact Form For HTML Based Website & Blog.
First Of All Create 2 Files:

contactform.html and contact.php.
Then Do As I Say…..
How To Create An HTML Working Contact Form For Your Blog & Website

Code for FORM:
(Copy Below Text And Paste It On Your contactform.html )
(Copy Below Text And Paste It On HTML Section Of Blogger Post)

<form action="contact.php" method="post" enctype="plain">   
       
         Name*:</br>
<input type="text" name="Name"  value="Your Name"  size="50"/>
        </br>
</br>
E-mail*:</br>
<input type="text" name="E-Mail"  value="Your E-Mail"  size="50"/>
         </br>
</br>
Message*:</br>
<textarea type="text" name="Message" rows="10" cols="39"  ></textarea>
         </br>
</br>
<input type="submit" value="Send" />
    <input type="reset" value="Reset" />

</form>

Code for PHP:

(Copy Below Text And Paste It On Notepad Then Save It In contact.php)
(And Upload It To Your FTP Server)
<?php
$field_name = $_POST['Name'];
$field_email = $_POST['E-Mail'];
$field_message = $_POST['Message'];


$mail_to = 'hassan.exe393@gmail.com';
$subject = '#Message# '.$field_name;

$body_message = 'From: '.$field_name."n";
$body_message .= 'E-mail: '.$field_email."n";
$body_message .= 'Message: '.$field_message;

$headers = 'From: '.$E-Mail."rn";
$headers .= 'Reply-To: '.$E-Mail."rn";

$mail_status = mail($mail_to, $subject, $body_message, $headers);

if ($mail_status) { ?>
<script language="javascript" type="text/javascript">
alert('Thank you for the message. We will contact you shortly.');
window.location = 'contactform.html';
</script>
<?php
}
else { ?>
<script language="javascript" type="text/javascript">
alert('Message sending failed. Please, send an email to hassan.exe393@gmail.com');
window.location = 'contactform.html';
</script>
<?php
}
?>





Features:
1.) There Is No Third Part Contact Form.
2.) Speed Up Loading Times.
3.) There Is No Limit Of Receiving Contact Form Data.




Customization:
1.) First Change All Red Text As You Want But Keeps Them Same Wording And Same Capitalization Of Letter.
2.) Change Blue Text As You Want, They Are A POP Up Confirmation News After Click On Send Button.
3.) Yellow Highlighted Text Is So Important To Change, Change It Your E-Mail In Which You Want Receive This E-Mail.
4.) Change Pink Text If You Want, It Will Appear On E-Mail Subject.

You Like It, Please Share This Recipe With Your Friends Using...

12 Responses to “How To Create An HTML Working Contact Form For Your Blog & Website”

  1. for blogger … wr i want to paste taht “cod for php”
    pls rply

  2. Hi, I’m so glad i found your post.

    I have a problem though:

    I uploaded the 2 files to MAMP but whe I run then it returnes errors on lines 14 and 15:

    line 14 – undefined variable E
    line 14 – undefined constant mail

    line 15 – undefined variable E
    line 15 – undefined constant mail

    many thanks
    DAN

  3. shakeel khan says:

    This Is Working Bro.
    Tnx For Your Help. I have Best Smyle From You. 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *