Hello, i’ve got contact form which when i write msg in it with special signs for example polish signs or in english <’> <"> it sends just <?>
I have no idea why it could be happened my html file is coded ok utf-8 and here’s php code
[php]<?php
$names = $_POST[‘names’];
$email = $_POST[‘email_address’];
$comment = $_POST[‘comment’];
$to =‘[email protected]’;
$message = “”;
$message .= "Name: " . htmlspecialchars($names, ENT_QUOTES) . “
\n”;
$message .= "Email: " . htmlspecialchars($email, ENT_QUOTES) . “
\n”;
$message .= "Comment: " . htmlspecialchars($comment, ENT_QUOTES) . “
\n”;
$lowmsg = strtolower($message);
$headers = “MIME-Version: 1.0\r\nContent-type: text/html; charset=UTF-8\r\n”;
$headers .= “From: “” . $names . “” <” . $email . “>\r\n”;
$headers .= "Reply-To: " . $email . “\r\n”;
$message = utf8_decode($message); mail($to, “EMCD - Feedback”, $message, $headers);
if ($message){
echo ‘sent’;
}else{
echo ‘failed’;
}
?>[/php]
I already tryed change :
[php]$headers = “MIME-Version: 1.0\r\nContent-type: text/html; charset=UTF-8\r\n”;[/php]
for:
[php]$headers .= “Content-Type: text/plain; charset = “UTF-8”;\n”;
$headers .= “Content-Transfer-Encoding: 8bit\n”;
$headers .= “\n”;[/php]
Here’s jquery code:
[code][/code]
and html code:
[code]
Feedback
What is your name?
Where can we email you back?
<h6 id="email-required"></h6></p><br/>
<p>What's on your mind?</p>
<p><br/>
<textarea class="contact-commnent" name="comments"></textarea>
<h6 id="comment-required"></h6></p><br/>
<p id="p-submit">
<input id="submit-form" class="submit-button" name="submit" type="submit" value="Submit"></p>
</form>
</div>[/code]
and in this case does not even send message
[size=10pt]Please help me that would appreciate !![/size]