iletisim.php
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
$error_message="Tüm boş alanları doldurmalısınız."; // Change this error message to whatever you wish.
$youremailaddress="SENİN-ADRESİN@SİTEN.COM"; // the email address of where the message will be sent
?>
<style type="text/css">
<!--
.b{font-family:Arial; font-size:9px; color:#6D6D6D; text-decoration:none}
.b1{font-family:Arial; font-size:11px; color:#7D7D7D; text-decoration:none}
.b2{font-family:Arial; font-size:14px; color:#7D7D7D; text-decoration:none}}
-->
</style>
<form action="" method="post">
<!------ Ask for the details---------->
<span class="b2"><b>Ad Soyad: </span><br>
<input type="text" span class="b2" name="name" size="20">
<br>
<span class="b2"><b>Email: </span><br>
<input type="text" span class="b2" name="email" size="20"><br>
<span class="b2"><b>Konu: </span><br>
<input type="text" span class="b2" name="subject" size="20"><br>
<span class="b2"><b>Isteginiz:</span><br>
<textarea span class="b2" name="message" cols="30" rows="10"></textarea><br>
<input type="submit" name="submit" span class="b2" value="Gönder">
<input type="reset" name="reset" span class="b2" value="Temizle">
</form>
<?php
if ($submit) { // if the submit button was pressed
if($name && $subject && $email && $message ) { // if all fields were completed
// check if email syntax is valid
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email) )
{
echo "Lütfen doğru mail girin!";
}
else {
mail("$youremailaddress","$subject","$message","From: $name <$email>") or die("email error");
echo "Mesajınız basarı ile gönderildi."; // if all went well, display message was sent
} // end of is email valid or not
} // end of if all fields were completed
else {
echo "$error_message<BR>"; // if not all were filled in, display error message
}
} // end php if statement
?></b></b></b></b><!----------System0 Simple Email Form------------------------------>
"SENİN.ADRESİN@SİTEN.COM" yazan kısma kendi mail adresini yazarsan işlem tamamlanır...