Witam
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"> <input id="name" name="name" class="text" /> <input id="email" name="email" class="text" /> <input id="company" name="company" class="text" /> <input id="subject" name="subject" class="text" /> <input type="image" name="imageField" id="imageField" src="images/send.gif" class="send" />
<?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;
}
if($errors==1
) echo $error; else{
$values = array ('name','email','message','company','subject'); $required = array('name','email','message','company','subject');
$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') {
if( empty($_POST[$value]) ) { echo 'Proszę wypełnić pola wymagane !'; exit; } }
$email_content .= $value.': '.$_POST[$value]."\n";
}
}
if(@mail($your_email,$email_subject,$email_content,"Content-type: text/plain; charset=utf-8\r\n")) { echo 'Wiadomość została pomyślnie wysłana !'; } else {
}
}
?>