GetSimple Support Forum

Full Version: Contact Us Form Error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
^ You removed <?php get_page_content(); ?> and you shouldn't have.

I'm updating the 1.1 very soon. I mean, very soon. Smile
Version 1.1 is now available.
Problem with the coding of the messages from the contact form.
The version 2.01
It is received on Email:

...test-2/index.php?id=contact
-----------------------------------

Name: п░п╩п╣п╨я│п╟п╫п╢я─
Email: test@gmail.com
Subject: п╨я─п╬п╡п╩я▐
Body: я┤п╣я─п╣п©п╦я┤п╫п╟я▐ п╨я─п╬п╡п╩я▐ п╦ я└п╟я│п╟п╢я▀
Is that my plugin your using?
What language?
Can you post the original text? (meaning entire email source)
Has established Simple Contact Plugin 1.1 and has translated to Russian.
On page is displayed correctly:
Name: Александр
E-mail: alex@mail.ru
Message: тема тема тема тема тема

It is received on Email:
Name: п░п╩п╣п╨я│п╟п╫п╢я─
E-mail: alex@mail.ru
Message: я┌п╣п╪п╟ я┌п╣п╪п╟ я┌п╣п╪п╟ я┌п╣п╪п╟ я┌п╣п╪п╟

For testing site I use localhost "Denwer" (package Apache+PHP +... Russian developers)
Thanks.
Replace your sc_mail function with this one and let me know what happens.
Code:
function sc_mail () {
    global $successmsg;
    global $sc_captcha;
    global $sc_to;
    $error = 0;
    if( isset($_POST['sc_submitted']) ) {
        $sc_email = $_POST['sc_email'];
        if(!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$sc_email )){
            $successmsg = "<div style=\"color:red; text-align:center;\">Invalid email address entered.</div>";
            $error = 1;
        }
        if ( empty($_POST['sc_name']) || empty($_POST['sc_email']) || empty($_POST['sc_subject']) || empty($_POST['sc_message'])) {
            $successmsg = "<div style=\"color:red; text-align:center;\">Please fill out all fields.</div>";
            $error = 1;
        }
        if ($_POST['sc_captcha'] != $sc_captcha) {
            $successmsg = "<div style=\"color:red; text-align:center;\">Captcha answer incorrect.</div>";
            $error = 1;            
        }
        if ($error != 1){
            $from = $_POST['sc_email'];
            $headers="Content-Type: text/plain; charset=UTF-8\r\n";
            $headers.= "From: $from \n";
            $message = "Name: ".$_POST['sc_name'];
            $message = $message."\n". "E-mail: ".$_POST['sc_email'];
            $message = $message."\n". "Message: ".$_POST['sc_message'];
            mail($sc_to, $_POST['sc_subject'], $message, $headers);
            $successmsg = "<div style=\"color:red; text-align:center;\">Thank you... The form was successfully sent.</div>";
            //Clear values
            $_POST = array();
        }
    } else {
        $successmsg = "";
    }
}
It has corrected a problem.
Now all is displayed correctly.

It is received on Email:
Имя: Александр
E-mail: alex@mail.ru
Сообщение: тема тема тема тема тема

Thanks
Still unreadable to me Wink
Guess that's my fault for not knowing Russian.
Pages: 1 2