Na mojej stronie znajduje sie formularz kontaktowy php. Mimo ze strona ma wspisane UTF8 od mailach zamiast polskich znakow przychodza krzaczki.
Formularz znajduje sie na stronie: Formularz Kontaktowy
A tutaj kod obciety o zbedne rzeczy :
<?php //If the form is submitted if(isset($_POST['submit'])) { //Check to make sure that the name field is not empty if(trim($_POST['contactname']) == '') { $hasError = true; } else { $name = trim($_POST['contactname']); } //Check to make sure that the subject field is not empty if(trim($_POST['subject']) == '') { $hasError = true; } else { $subject = trim($_POST['subject']); } //Check to make sure sure that a valid email address is submitted if(trim($_POST['email']) == '') { $hasError = true; } else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", trim($_POST['email']))) { $hasError = true; } else { $email = trim($_POST['email']); } //Check to make sure comments were entered if(trim($_POST['message']) == '') { $hasError = true; } else { if(function_exists('stripslashes')) { $comments = stripslashes(trim($_POST['message'])); } else { $comments = trim($_POST['message']); } } //If there is no error, send the email if(!isset($hasError)) { $emailTo = 'email@email.com'; //Put your own email address here $body = "Name: $name \n\nEmail: $email \n\nSubject: $subject \n\nComments:\n $comments"; $headers = 'From: www.email.com <'.$emailTo.'>' . "\r\n" . 'Reply-To: ' . $email; mail($emailTo, $subject, $body, $headers); $emailSent = true; } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/style.css" rel="stylesheet" type="text/css" /> <link href="css/contact-form-styles.css" rel="stylesheet" type="text/css" /> </head> <!-- top start --> <!-- top end --> <!-- header start --> <!-- header end --> <!-- content start --> <div id="contact-wrapper"> <?php if(isset($hasError)) { //If errors are found ?> <?php } ?> <?php if(isset($emailSent) && $emailSent == true) { //If email is sent ?> <?php } ?> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" id="contactform"> <div> <input type="text" size="50" name="contactname" id="contactname" value="" class="required" /> </div> <div> <input type="text" size="50" name="email" id="email" value="" class="required email" /> </div> <div> <input type="text" size="50" name="subject" id="subject" value="" class="required" /> </div> <div> </div> <div> <input class="submitbutton" type="submit" value="Send Message" name="submit" /> </div> </form> </div> </div> </div> <!-- content end --> <!-- footer start --> <!-- footer end --> </div> </body> </html>