iyi günler arkadaşlar altta belirtmiş olduğum kodlar benim üzerinde çalıştığım bir temaya ait bu contact form da isim email ve mesaj bölmesi var ben araya birde motor modeli eklemek istiyordum ve ekledim fakat gönder'e bastığım zaman mesajda isim email ve mesaj bölmesi dolu motor bölmesi boş geliyor.
yardımlarınızı bekliyorum.
<?php /* * Contact Form */ session_start(); global $VAN; $nameError=''; $motorError=''; $emailError=''; $commentError=''; $captchaError='';
//If the form is submitted if(isset($_POST['submitted'])) { //Check to make sure that the name field is not empty if(trim($_POST['contactName']) === '') { $nameError = __('Lütfen Adınızı belirtiniz.','SimpleKey'); $hasError = true; } else { $name = trim($_POST['contactName']); }
//Check to make sure that the motor field is not empty if(trim($_POST['motor']) === '') { $motorError = __('Lütfen motor modelinizi belirtiniz.','SimpleKey'); $hasError = true; } else { $motor = trim($_POST['motor']); }
//Check to make sure sure that a valid email address is submitted if(trim($_POST['email']) === '') { $emailError = __('You entered an invalid email address.','SimpleKey'); $hasError = true; } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) { $emailError = __('Size ulaşabilmek için geçerli bir mail adresi belirtiniz.','SimpleKey'); $hasError = true; } else { $email = trim($_POST['email']); }
//Check to make sure comments were entered if(trim($_POST['comments']) === '') { $commentError = __('You forgot to enter your comments.','SimpleKey'); $hasError = true; } else { if(function_exists('stripslashes')) { $comments = stripslashes(trim($_POST['comments'])); } else { $comments = trim($_POST['comments']); } }
POST ile gelen veriyi atadığınız değişken ile body kısmında yazdırdığınız değişken farklı. $motorName değişkenini $motor olarak değiştirince olması lazım.
motorError için <?php }else{ ?> kısmını kaldırıp altındaki ifleri elseif yaparsanız çalışması lazım .
yardımlarınızı bekliyorum.
DH forumlarında vakit geçirmekten keyif alıyor gibisin ancak giriş yapmadığını görüyoruz.
Üye Ol Şimdi DeğilÜye olduğunda özel mesaj gönderebilir, beğendiğin konuları favorilerine ekleyip takibe alabilir ve daha önce gezdiğin konulara hızlıca erişebilirsin.