triplesho7
Registered
Здравейте. Защо когато изпращат имейли от контакт формата ми в сайта на кирилица при мен излизат на маймуница. Трябва да бъдат само на латиница за да знам какво ме питат, което не е окей за съжалние... Някой може ли да помогне?
Ето и кода, който използвам:
Формата за контакт в сайта:
Ето и кода, който използвам:
Код:
<?php
$name = htmlentities($_POST["name"]);
$email_from = htmlentities($_POST["email"]);
$subject = htmlentities($_POST["subject"]);
$message = htmlentities($_POST["message"]);
$email_to = "support@medenki.com";//replace with your email
$headers = "From: webmaster@example.com" . "rn" . "CC: ". $email_from; //This adds a from field, as well as CC"s the person submitting the request.
//Build the body of the eamil
$body = "Name: " . $name . "nn" . "Email: " . $email_from . "nn" . "Subject: " . $subject . "nn" . "message: " . $message;
$success = mail($email_to, "Contact from site X, regarding: ".$subject, $body,$headers);
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<?php if($success){ //If the email was sent correctly?>
<script>
alert("Благодаря Ви, че се свързахте. Ще се свържем с вас възможно най-скоро.");
</script>
<?php header("Location: ../index.php"); }else{?>
<script>
alert("При изпращането на имейла възникна грешка. Моля, опитайте отново по-късно.");
</script>
<?php header("Location: ../index.php"); } //If the email falied?>
</head>
Формата за контакт в сайта:
Код:
<form action="send-contact.php" class="contact-form" name="contact-form" method="post">
<div class="row">
<div class="col-sm-6 cols">
<input type="text" name="name" required="required" placeholder="Име*">
</div>
<div class="col-sm-6 cols">
<input type="email" name="email" required="required" placeholder="Имейл*">
</div>
<div class="col-sm-6 cols">
<input type="text" name="subject" required="required" placeholder="Заглавие*">
</div>
<div class="col-sm-12 cols">
<textarea name="message" required="required" cols="30" rows="5" placeholder="Съобщение*"></textarea>
</div>
<div class="col-sm-12 cols">
<input type="submit" name="submit" value="Изпрати съобщение" class="btn btn-send">
</div>
</div>
</form>