GetSimple Support Forum
Contact Us Form Error - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16)
+--- Thread: Contact Us Form Error (/showthread.php?tid=467)

Pages: 1 2


Contact Us Form Error - internet54 - 2010-03-10

^ You removed <?php get_page_content(); ?> and you shouldn't have.

I'm updating the 1.1 very soon. I mean, very soon. Smile


Contact Us Form Error - internet54 - 2010-03-10

Version 1.1 is now available.


Contact Us Form Error - Alex - 2010-03-12

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: я┤п╣я─п╣п©п╦я┤п╫п╟я▐ п╨я─п╬п╡п╩я▐ п╦ я└п╟я│п╟п╢я▀


Contact Us Form Error - internet54 - 2010-03-12

Is that my plugin your using?
What language?
Can you post the original text? (meaning entire email source)


Contact Us Form Error - Alex - 2010-03-12

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.


Contact Us Form Error - internet54 - 2010-03-12

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 = "";
    }
}



Contact Us Form Error - Alex - 2010-03-12

It has corrected a problem.
Now all is displayed correctly.

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

Thanks


Contact Us Form Error - internet54 - 2010-03-13

Still unreadable to me Wink
Guess that's my fault for not knowing Russian.