DesignAli Posted May 29, 2012 Share Posted May 29, 2012 (edited) Şu forma tarih saat bilgilerini yazıyorum çalışmıyor. yardım edin lütfen. [codebox]<?php $contact_name = $_POST['name']; $contact_email = $_POST['email']; $contact_subject = $_POST['subject']; $contact_message = $_POST['message']; if( $contact_name == true ) { $sender = $contact_email; $receiver = "gideceği mail adresi"; $client_ip = $_SERVER['REMOTE_ADDR']; $email_body = "İsim: $contact_name \nE-mail: $sender \nKonu: $contact_subject \nMesaj: $contact_message \nIP: $client_ip \nTarih: BURAYA TARİH SAAT YAZILACAK"; $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion(); if( mail( $receiver, "Siteden mesaj var! - $subject", $email_body, $extra ) ) { echo "success=yes"; } else { echo "success=no"; } } ?>[/codebox] Bu kodu "tarih" yazılı yere nasıl yerleştirebilirim? [code]$today = date("d.m.Y H:i:s");[/code] Edited May 29, 2012 by DesignAli Quote Link to comment Share on other sites More sharing options...
carysma1 Posted May 29, 2012 Share Posted May 29, 2012 [code] <?php $contact_name = $_POST['name']; $contact_email = $_POST['email']; $contact_subject = $_POST['subject']; $contact_message = $_POST['message']; $tarih = date("d.m.Y H:i:s"); if( $contact_name == true ) { $sender = $contact_email; $receiver = "gideceği mail adresi"; $client_ip = $_SERVER['REMOTE_ADDR']; $email_body = "İsim: $contact_name \nE-mail: $sender \nKonu: $contact_subject \nMesaj: $contact_message \nIP: $client_ip \nTarih: $tarih"; $extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion(); if( mail( $receiver, "Siteden mesaj var! - $subject", $email_body, $extra ) ) { echo "success=yes"; } else { echo "success=no"; } } ?> [/code] Quote Link to comment Share on other sites More sharing options...
DesignAli Posted May 29, 2012 Author Share Posted May 29, 2012 abim çok sağol fakat saat ile ilgili problem var. sitemde 23 olan saati 15 gösteriyor. localhostta 1 saat geriden geliyor. dakikalar doğru Quote Link to comment Share on other sites More sharing options...
carysma1 Posted May 30, 2012 Share Posted May 30, 2012 Bunu en başa ekle date_default_timezone_set('Europe/Istanbul'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.