Obsah fóra
PravidláRegistrovaťPrihlásenie




Odpovedať na tému [ Príspevkov: 7 ] 
AutorSpráva
Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 11.06.05
Príspevky: 17
Témy: 5
Príspevok NapísalOffline : 01.07.2007 19:40

Mam normalne fungujuci webformular na posielanie mailu z webu, ale nepodporuje to diakritiku - niektore pismenka sa zobrazuju blbo. A tak podla navodu na
http://cz2.php.net/manual/cs/function.mail.php
som chcel dodat do hlavicky odosielaneho mailu tento riadok
Kód:
Content-Type: text/html; charset=windows-1250

a potom by uz diakritika sa zobrazovala spravne.


v PHP povodny formular vyzera takto:

Kód:
//Message to YOU
$email_from = "$mailfrom";
$email_headers = "From: " . $custname . " <" . $email_from . ">\r\n";
$email_headers .= "Reply-to: " . $email_from . "\r\n";
$email_subject = $subject . ;
$email_mess .= $customer_message . "\r\r\n";
//End of message to You


ked tam ale vlozim toto:
Kód:
$email_headers .= "Content-Type: text/html; charset=windows-1250\n"; //Mime typ

alebo toto
Kód:
$email_headers = "MIME-Versin: 1.0\r\n" .
                   "Content-type: text/plain; charset=windows-1250; format=flowed\r\n" .
                   "Content-Transfer-Encoding: 8bit\r\n" .


Tak v hlavicke uz je zvoleny sposob kodovania, diakritika sa zobrazuje spravne, ALE namiesto mena a emailu zakaznika v hlavicke
From: Meno Zakaznika <jeho@email.sk>
sa zobrazi tato blbost:
From: nobody@mojadomena.sk

Kde mam chybu?

Dik.

Martin


Offline

Užívateľ
Užívateľ
diakritika v maile z webu caz PHP

Registrovaný: 10.02.07
Prihlásený: 14.08.09
Príspevky: 255
Témy: 27
Bydlisko: KE
Príspevok NapísalOffline : 01.07.2007 21:24

ukaz cely kod ne iba kusky







_________________
drahi hackeri! teraz mozete okamzite premazat cely tento server! stlacte skratku ALT+F13
Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 21.06.07
Prihlásený: 06.05.13
Príspevky: 421
Témy: 4
Príspevok NapísalOffline : 02.07.2007 6:56

Nema byt riadok:

$email_from = "$mailfrom";

bez uvodzoviek ? Takto:

$email_from = $mailfrom;


Offline

Užívateľ
Užívateľ
diakritika v maile z webu caz PHP

Registrovaný: 10.02.07
Prihlásený: 14.08.09
Príspevky: 255
Témy: 27
Bydlisko: KE
Príspevok NapísalOffline : 02.07.2007 7:09

no to by nemalo vadit

pocuj ukaz nam cely kod, aj vypis obsah vsetkych premennych, aby sme vedeli ako to vyzera







_________________
drahi hackeri! teraz mozete okamzite premazat cely tento server! stlacte skratku ALT+F13
Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 11.06.05
Príspevky: 17
Témy: 5
Príspevok Napísal autor témyOffline : 02.07.2007 10:05

Oroginálny celý kód:

Kód:
<?php
//Security Check
$secimgnum = $_POST['imgnum'];
$securitycode = $_POST['securitycode'];
$encryptedcode = md5($securitycode);
$sql = "select * from " . $tblprefix . "images where imagenumber='$secimgnum' and code='$encryptedcode';";
$result = mysql_query($sql) or die(mysql_error());
$rows = mysql_num_rows($result);
if ($rows != 1) {
echo "You mistyped the security code, please click your back button and try again!";
exit();
}
//End of Security Check

//Begin Email Processing Engine
echo "<p><h2>Your email was sent!</h2></p>\n";

//Collect Post Array Data From Submitted Form and Environment
$usragent = $_SERVER['HTTP_USER_AGENT'];  //Get Customer's User Agent
$remoteaddr = $_SERVER['REMOTE_ADDR'];    //Get Customer's Ip Addrress
$custname = $_POST['nm_fhgkic8'];         //Get Customer's Name
$companyname = $_POST['compname'];        //Get Company Name
$mailfrom = $_POST['dhfygien'];           //Get Customer's Email Address
$subject = default_subject; //Subject of Email to you
$customer_message = $_POST['aabbccddee']; //Get Customer's Message
$continent = $_POST['continent'];
$service = $_POST['webdes'] . "\n";       //These colelct the services the customer is interested in:
$service .= $_POST['logodes'] . "\n";
$service .= $_POST['hosting'] . "\n";
$leadsource = $_POST['leadsource'];       //Where did the customer hear about you?
$addnewsletter = $_POST['newslettersub']; //Returns "Yes" or "No" about adding to the newsletter
$sendmail = $_POST['sendmail'];           //Send demo emails or not?
$to = myemail;  //Your email address, as defined in secureformsettings.php

//Message to YOU: Make changes here, beware of the concatinating operator " .= " that you'll need to use at certain times.
$kara_email_from = "$mailfrom";
$kara_email_headers = "From: " . $custname . " <" . $kara_email_from . ">\r\n";
$kara_email_headers .= "Reply-to: " . $kara_email_from . "\r\n";
$kara_email_subject = $subject;
$kara_email_message = $custname . " has requested information on your services.  ";
$kara_email_message .= "He/she learned about you via " . $leadsource . "\n\n";
$kara_email_message .= "He/she lives on this continent: " . $continent . "\n\n";
$kara_email_message .= "Here are the services that " . $custname . " is interested in: \n\n";
$kara_email_message .= $service;
$kara_email_message .= "\n\n Does " . $custname . " want to be added to the newsletter?\t" . $addnewsletter . ". \n\n";
$kara_email_message .= "Here is the message he/she sent:\r\r\n";
$kara_email_message .= $customer_message . "\r\r\n";
$kara_email_message .= $custname . "'s Email Address: " . $kara_email_from . "\r\n";
$kara_email_message .= "UserAgent: " . $usragent . "\r\n";
$kara_email_message .= "IP: " . $remoteaddr . "\r\n";
//End of message to Your Business

//Automated reply message to customer: Make changes here, beware of the concatinating operator " .= " that you'll need to use.
$email_from = $to;
$email_headers = "From: " . email_name . " <" . $emailfrom . ">\r\n";
$email_headers .= "Reply-to: " . $to . "\r\n";
$email_subject = customer_subject;
$email_message = "Thank you, " . $custname . ", for your interest in our services! \r\n";
$email_message .= "We will get back to you soon. \n";
$email_message .= "\r";
$email_message .= "We hope to do business with you soon! \r\r\n";
$email_message .= "Sincerely, \r\r\n";
$email_message .= "     The Team \r\n";
$email_message .= "\r\r\r";
$email_message .= "---------------------------\r\n";
$email_message .= "Your Message:<br />\r\r\n";
$email_message .= $customer_message;
//End of automated reply message


//Send Email(s)
if (sendautoresponse == 1) {
mail($to,$kara_email_subject,$kara_email_message,$kara_email_headers); //Email to you
mail($mailfrom,$email_subject,$email_message,$email_headers);          //Autoresponse
}
elseif (sendautoresponse == 0) {
mail($to,$kara_email_subject,$kara_email_message,$kara_email_headers); //Email to you
}
//End Email Processing Engine
?>


Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 21.02.07
Prihlásený: 21.02.10
Príspevky: 3984
Témy: 96
Príspevok NapísalOffline : 09.07.2007 18:16

ty kokso to si z kade vykopal??


Offline

Užívateľ
Užívateľ
Obrázok užívateľa

Registrovaný: 21.02.07
Prihlásený: 21.02.10
Príspevky: 3984
Témy: 96
Príspevok NapísalOffline : 10.07.2007 19:01

daj kodovanie utf-8


Odpovedať na tému [ Príspevkov: 7 ] 


Podobné témy

 Témy  Odpovede  Zobrazenia  Posledný príspevok 
V tomto fóre nie sú ďalšie neprečítané témy. php - diakritika

v PHP, ASP

12

1144

29.10.2015 10:31

chrono Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Diakritika v PHP

v PHP, ASP

1

1547

14.08.2009 19:25

Snacker Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Diakritika mailov v PHP

v PHP, ASP

9

721

23.05.2010 11:39

petanorech Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Nefunkčná diakritika v PHP

v PHP, ASP

6

417

22.05.2014 23:17

stenley Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. PHP kontaktny formular a diakritika

v PHP, ASP

2

519

09.03.2015 20:43

walther Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Nefunguje include + štruktúra webu v PHP

v PHP, ASP

7

521

08.04.2013 14:40

walther Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. nabijanie caz USB

v Mobilné zariadenia

5

912

15.04.2007 14:40

Shark NX Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Ponukam vytvorenie webu v PHP+mySQL+Design

v Ponuka práce

0

884

16.11.2009 15:31

Ecko Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. PHP a En resp. SK verzia webu

v PHP, ASP

21

1084

25.09.2009 11:13

baumax Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Nezabezpečená časť webu, ak sa názov súboru čerpá z databazy pomocou PHP

v PHP, ASP

2

280

26.12.2020 14:28

jakubv Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Diakritika

v Delphi, Visual Basic

1

761

05.05.2009 20:20

programator Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Diakritika

v Databázy

2

746

30.03.2009 22:22

22adamko Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Diakritika

v Redakčné systémy

19

1465

06.05.2007 10:54

p360t Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Diakritika

v HTML, XHTML, XML, CSS

13

820

03.12.2008 14:12

exoomer Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. Diakritika

v Databázy

11

1094

30.08.2009 20:30

bmatias Zobrazenie posledných príspevkov

V tomto fóre nie sú ďalšie neprečítané témy. diakritika

v HTML, XHTML, XML, CSS

13

718

01.12.2010 14:18

coldak Zobrazenie posledných príspevkov


Nemôžete zakladať nové témy v tomto fóre
Nemôžete odpovedať na témy v tomto fóre
Nemôžete upravovať svoje príspevky v tomto fóre
Nemôžete mazať svoje príspevky v tomto fóre

Skočiť na:  

Powered by phpBB Jarvis © 2005 - 2024 PCforum, webhosting by WebSupport, secured by GeoTrust, edited by JanoF
Ako väčšina webových stránok aj my používame cookies. Zotrvaním na webovej stránke súhlasíte, že ich môžeme používať.
Všeobecné podmienky, spracovanie osobných údajov a pravidlá fóra