coomante Posted May 10, 2007 Share Posted May 10, 2007 mrb sıteye sımdı uye oldum sıte gercekten mukemmel olmus arkadaslar ben sureklı flash calısıyorum ancak php de cok kucuk bır sorunum var oncelıkle php modullu bı host aldım php modullerını kurdum fızıksel hostıng olusturdum ancak hayatımda hıc php calısmadım benım sorunum bı ıletısım formu var buraya gonder dedıgı zaman php ılı baglantıyı saglıyorum fakat php ıcındekı kodları nasıl duzenlıycem bu cantact.php dosyasını hostta nereye atıcam yardımcı olurmusunuz ben sıze ıcındekı kodları yazayım yardım eden herkesden Allah razı olsun kendı maıl adresımı nereye yazıcam yanı gonder dedgıgı zaman adam nereye gıdıcek flash php ye post data gonderıyor <? Print_r ($_REQUEST); Error_Reporting(E_ALL & ~E_NOTICE); $subject="from".$_REQUEST['your_name']; $headers= "From:".$_REQUEST['your_email']."\n"; $headers.='Content-type: text/html; charset=iso-8859-1'; $i=1; $message=''; while ($_REQUEST['field_'.$i.'_descr']) { $message.="<strong>".$_REQUEST['field_'.$i.'_descr']."</strong> ".$_REQUEST['field_'.$i]."<br>"; $i++; } $message.="<br>".$_REQUEST['message']."<br><br>"; mail($_REQUEST['recipient'], $subject, " <html> <head> <title>Contact letter</title> </head> <body> <br> ".$message." </body> </html>" , $headers); echo ("Your message was successfully sent!"); ?> <script> resizeTo(300, 300); // window.close() </script> Link to comment Share on other sites More sharing options...
dr.hardware Posted May 10, 2007 Share Posted May 10, 2007 $subject="from".$_REQUEST['your_name'];$headers= "From:".$_REQUEST['your_email']."\n"; burayı doldurup dene! ama sanki bi eksikli var gibime geliyor Link to comment Share on other sites More sharing options...
Muscle Posted May 10, 2007 Share Posted May 10, 2007 Bu contact.php dosyasını indirdiğin yerde açıklaması olması lazım, eğer flash ile beslenecekse işin zorlaşacaktır! Link to comment Share on other sites More sharing options...
coomante Posted May 10, 2007 Author Share Posted May 10, 2007 Bu contact.php dosyasını indirdiğin yerde açıklaması olması lazım, eğer flash ile beslenecekse işin zorlaşacaktır! tesekkur ederım arkadaslar ancak nasıl yapıcam bunu ya şöyle bır sey var olmazmı <% for i=1 to 7 message=message + "<strong>"&Request("field_"&i&"_descr")&"</strong> "&Request("field_"&i)&"<br>" next message=message + Request("message") smtpServer = "enter your SMTP SERVER HERE" smtpPort = 25 name = Request("your_name") Set myMail = CreateObject("CDO.Message") myMail.Subject = "from " & name myMail.From = Request("your_email") myMail.To = Request("recipient") myMail.HTMLBody = "<html><head><title>Contact letter</title></head><body><br>" & message & "</body></html>" myMail.Configuration.Fields.Item(") = 2 myMail.Configuration.Fields.Item(") = smtpServer myMail.Configuration.Fields.Item("Please register to see this content.) = smtpPort myMail.Configuration.Fields.Update myMail.Send %> Link to comment Share on other sites More sharing options...
Hakinen Posted May 16, 2007 Share Posted May 16, 2007 $adminmail = "[email protected]";$sitename = "Benim Sitem";$u_mail = $_POST[user_mail];$buguntarih = date("d.m.Y-H.i.s"); $site = $_SERVER['SERVER_NAME']; $headers = "Content-type: text/html; charset=iso-8859-9\n"; $headers .= "From: $site <$u_mail>\n"; $headers .= "X-Sender: <$u_mail>\n"; $headers .= "X-Mailer: PHP\n"; $headers .= "X-Priority: 1\n"; $headers .= "Return-Path: <$u_mail>\n"; $subject = "$sitename İletişim Formu ($buguntarih)"; $body = "$site sitesinden $isim isimli kişi $buguntarih tarihinde iletişim formunu doldurarak size bildirmek istedi. Bu bilgiler aşağıdadır.<br><br>\n"; $body .= "<br><br><br>\n"; $body .= "<b>Bilgiler</b><br>\n"; $body .= "<b>Adı ve Soyadı :</b> $isim<br>\n"; $body .= "<b>Adres :</b> $adres<br>\n"; $body .= "<b>GSM No :</b> $gsm<br>\n"; $body .= "<b>Telefon :</b> $telefon<br>\n"; $body .= "<b>E-Mail Adresi :</b> $email<br>\n"; $body .= "<b>Açıklama :</b> $mesaj<br>\n"; $gonder=@mail($adminmail, $subject, $body, $headers); [/CODE] Body arasona form içinde değişlenleri girersin. Mesela; Adamın Notu mu var. Kullandığı Text Areanın adı da messagemi; $body .= "<b>Mesaj:</b> $_POST[message]<br>\n"; Olarak bir ekleme yapabilirsin. Burada dikkat etmen gereken, ilk body in önünde nokta yok. SOnrakilerde var. Yani aynı isimle 2 den fazla değişken böyle print edilir. body bir değişkendir. Bunun adını mesaj olarak da değiştirebilirsin. Admin mail senin mail.ç U_mail ise kullanıcının mail adresi. Karşıdan gelen değişkene göre formu gönderebilirsin. Ayrıca $gonder değerinden sonra mail kontrolü yapmak istersen, [CODE]if($gonder){echo "Gönderildi";} else { echo "Gönderilemedi !!!";} [/CODE] kodunu da devamında uygulayabilirsin. Kolay gelsin. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.