Mam pewien problem polegający na tym, że otrzymując maila zamiast słowa ,np "Imię i Nazwisko" otrzymuję "name". Co zrobić ,aby to spolszczyć ?
Poniżej podaje kody:
<form action="contact.php" method="post" id="contactform"> <ol> <li> <input id="name" name="name" class="text" /> </li> <li> <input id="email" name="email" class="text" /> </li> <li> <input id="company" name="company" class="text" /> </li> <li> <input id="subject" name="subject" class="text" /> </li> <li> </li> <li class="buttons"> <input type="image" name="imageField" id="imageField" src="images/send.gif" class="send" /> </li> </ol> </form>
<?php $email = $_POST['email']; //$error[] = preg_match('/\b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i', $_POST['email']) ? '' : 'Neprawidłowy adres email !'; if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email )){ $error.="Błędnie wpisany adres email !"; $errors=1; } else{ $your_email = "xxxxx@xxxxx.pl"; $email_subject = "New Message: ".$_POST['subject']; $email_content = "Nowa wiadomość:\n"; foreach($values as $key => $value){ if ($key != 'subject' && $key != 'company') { } $email_content .= $value.': '.$_POST[$value]."\n"; } } if(@mail($your_email,$email_subject,$email_content,"Content-type: text/plain; charset=utf-8\r\n")) { } else { } } ?>