Skip to content
September 27, 2011 / Kholis Media

Simple Form with php


Save file html di bawah ini dengan nama contact.html

<form action="sent3.php" method="post">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<td width="29%" class="bodytext">Nama Anda:</td>
<td width="71%"><input name="name" type="text" id="name" size="32"></td>
<td class="bodytext">Alamat Email:</td>
<td><input name="email" type="text" id="email" size="32"></td>
<td class="bodytext">Phone:</td>
<td><input name="phone" type="text" id="phone" size="32"></td>
<td class="bodytext">Tanggal Lahir:</td>
<td><input name="tanggal_lahir" type="text" id="tanggal_lahir" size="32"></td>
<td class="bodytext">Komentar:</td>
<td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td>
<td class="bodytext">&nbsp;</td>
<td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td>

2. Kode PHP

Simpan kode php di bawah ini dengan nama sent3.php

$ToEmail = ' ';
$EmailSubject = 'komentar tamu ';
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["email"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY = "Nama Tamu: ".$_POST["name"]."<br>";
$MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>";
$MESSAGE_BODY .= "Tanggal Lahir: ".$_POST["tanggal_lahir"]."<br>";
$MESSAGE_BODY .= "Phone: ".$_POST["phone"]."<br>";
$MESSAGE_BODY .= "Komentar: ".nl2br($_POST["comment"])."<br>";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
/* Redirect visitor to the thank you page */
header('Location: <a href=""></a>');

Keunggulan sent3.php di atas adalah ketika visitor selesai mengklik button submit , akan diredirect ke url tujuan yaitu


One Comment

Leave a Comment
  1. Sang Floriano / Mar 14 2012 11:17 am

    Hello Webmaster, I noticed that is ranking pretty low on Google and has a low Google PageRank. Now the Google PageRank is how Google is able to see how relevant your webpage is compared to all the other webpages online, if you cannot rank high at the top of Google, then you will NOT get the traffic you need. Now usually trying to get to the top of Google costs hundreds if not thousands of dollars and very highly optimized targeted marketing campaigns that takes a team of experts months to achieve. However, we can show you how to get to the top of Google with no out of pocket expenses (free traffic), no stupid ninja tricks, no silly mind control techniques, and this will be all white hat with no blackhat software or tactics that could possibly land you on bad terms with Google and put you in the dreaded “Google Sandbox”. We’ll show you how to easily capture all the targeted traffic you need, for free, multiple ways to land fast (not months) first-page rankings in Google and other major search engines (Bing, Yahoo, Ask, etc), even show you strategies on how to earn daily commissions just try Ranking Top of Google, please check out our 5 minute video.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: