Contact form and incoming results
Hi there.
I use a xml contact form which is consists of these files:
contact_form.php
<?php
$sendTo = "info@mymail.gr";
$subject = "Φόρμα συμπλήρωσης ενδιαφέροντος από mysite.gr";
$message = $_GET['message'];
$email = $_GET['email'];
$name = $_GET['name'];
//send mail
$headers = "Από: $email\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-UTF-8' . "\r\n";
$msg = "Οι ακόλουθες πληροφορίες καταχωρήθηκαν από τον ιστότοπο mysite.gr:\n\nΌνομα:".$name."\n\nE-mail:".$email."\n\nΜήνυμα:".$message."";
mail($sendTo, $subject, $msg, $headers);
echo "status=formOk";
?>
contact.xml
<?xml version="1.0" encoding="utf-8" ?>
<contacts><![CDATA[Παρακαλουμε, συμπληρωστε τη φορμα με τα στοιχεια σας και το λογο εκδηλωσης ενδιαφεροντος και θα επικοινωνησουμε μαζι σας το συντομοτερο δυνατο. Ευχαριστουμε]]></contacts>
and the contact.swf.
Inside the .swf the send function is this:
function sendForm () {
send_lv.name = formTitles.nameInput.text;
send_lv.email = formTitles.emailInput.text;
send_lv.message = formTitles.messageInput.text;
//
if ((formTitles.nameInput.text != "") and (formTitles.nameInput.text != "Πληκτρολογήστε το όνομά σας") and (formTitles.emailInput.text != "") and (formTitles.emailInput.text != "Πληκτρολογήστε το email σας") and (formTitles.emailInput.text.indexOf ("@", 0) != -1) and (formTitles.emailInput.text.indexOf ('.', 0) != -1) and (formTitles.messageInput.text != "") and (formTitles.messageInput.text != "Πληκτρολογήστε το μήνυμά σας")) {
formTitles.sendBT.bt.enabled = false;
send_lv.sendAndLoad ("contact_form.php",result_lv,"GET");
}
else {
validateForm ();
}
//
result_lv.onLoad = function (success:Boolean) {
if (success) {
formTitles.statusTxt.text = "Το μήνυμα εστάλη επιτυχώς";
if (result_lv.status == "formOk") {
formTitles.sendBT.bt.enabled = true;
cleanForm ();
}
}
else {
formTitles.statusTxt.text = "Αποτυχία αποστολής";
//trace ("server error");
}
};
}
When i get the results of the form at my email. i get squares with question marks (�) at message and name values which have been inserted by the user. The rest mail appears just fine (subject, msg and email). I have embedded greek characters at my dynamic texts in .swf but i have no results. I also have saved all my files at UTF-8.
Any ideas?
I would appreciate if someone could answer this question
