Form Mailnya saya sederhanakan seperti ini
<form enctype="multipart/form-data" action="http://abdgamal.ueuo.com/sendemail.php" method="post" accept-charset="UTF-8">
<br/>
<font face="Verdana" color="#000000" size="2">Your Name*</font><br/>
<input maxlength="100" value="" name="FieldData0" size="45" type="text"/><br/>
<font face="Verdana" color="#000000" size="2">Your Email Address*</font><br/>
<input maxlength="100" value="" name="FieldData1" size="45" type="text"/><br/>
<font face="Verdana" color="#000000" size="2">Website Url</font><br/>
<input maxlength="100" value="" name="FieldData2" size="45" type="text"/><br/>
<td nowrap><font face="Verdana" color="#000000" size="2">Ads Title*</font><br/>
<input maxlength="100" value="" name="FieldData3" size="45" type="text"/><br/>
<font face="Verdana" color="#000000" size="2">Your Ads*</font><br/>
<textarea rows="10" cols="34" name="FieldData5"></textarea><br/>
<input value="Send" name="submit" type="submit"/> <input value=" Clear " name="Clear" type="reset"/>
</form>
Save form ini dimana saja pada blog anda
Ganti alamat yang berwarna merah dengan alamat di ueuo.com
langkah selanjutnya adalah buat script sendemail.php di ueuo.com
scriptnya adalah
<?
if($_POST[submit])
{
$pesan=urldecode($_POST[FieldData5]);
$pesan=str_replace('\"','"',$pesan);
$pesan=str_replace("\'","'",$pesan);
$kirim="Dear $_POST[FieldData0]".","."\n";
$kirim .="Anda Mendapat Kiriman Email"."\n\n";
$kirim .="Email Pengirim".":"."$_POST[FieldData1]"."\n";
$kirim .="Url Pengirim".":"."$_POST[FieldData2]"."\n\n";
$kirim .="Ads Title".":"."$_POST[FieldData3]"."\n\n";
$kirim .="Your Ads : $pesan"."\n\n";
$sendi= mail("abdgamal16@gmail.com","PESAN BUAT ANDA","$kirim\n\n", "FROM:\"AbdGamal\"<abdgamal16@gmail.com>\n"."X-IP-Address: $_SERVER[REMOTE_ADDR]\n"."X-Referer: $_SERVER[HTTP_REFERER]\n");
if($sendi)
{
header('location:http://abgamal.blogspot.com');
}
else
{
?>
<script>
alert('gagal kirim email');
window.location="http://abgamal.blogspot.com";
</script>
<?
}
}
?>
Ganti yang biru sesuai email dan blog anda. Save as sendemail.php
semoga berhasil.
No comments:
Post a Comment