Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Problem with encoding in signup form
Old 03-28-2009, 07:47 AM Problem with encoding in signup form
Junior Talker

Posts: 4
Trades: 0
Hi,
please what to insert in below code to encoding in utf-8 all the fields sending?
Thanks
Code:
@mail($_POST['email'], $signupsubj, $signupmsg, GetConfig('msgheaders'));
zoomm is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 03-28-2009, 10:37 AM Re: Problem with encoding in signup form
Junior Talker

Posts: 4
Trades: 0
i chαnge the code and work only $signupsubj... Please help

@mail($_POST['email'], $signupsubj = '=?utf-8?b?' . base64_encode("".$signupsubj."") . '?=', $signupmsg = '=?utf-8?b?' . base64_encode("".$signupmsg."") . '?=', GetConfig('msgheaders'));
zoomm is offline
Reply With Quote
View Public Profile
 
Old 03-30-2009, 07:55 AM Re: Problem with encoding in signup form
Novice Talker

Posts: 6
Name: No
Trades: 0
can you explain more?
ocZio is offline
Reply With Quote
View Public Profile
 
Old 03-30-2009, 08:32 AM Re: Problem with encoding in signup form
Junior Talker

Posts: 4
Trades: 0
the problem is when i view the email in outlook express. the theme and the body the text is like this: ΞΞΉ ΟΞΞΟΞΏΟΞΏΟΞ―Ξ΅Ο Ξ΅ΞΞΟΞΟΞ ΟΞΟ

if i insert the below i think the problem will fix.

$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-7\r\n";
$headers.= "From: my-email <email>\r\n";

the code is:

Code:
function Signup() { 
    $msg = ''; 
    if (isset($_POST['editaccount'])) { 
        TrimRequest(); 
        if (!$_POST['email']) $msg = Msg_Err('Παρακαλώ εισάγετε το e@mail σας!'); 
if (!$msg) if ((strlen($_POST['pass']) < 5) || (strlen($_POST['pass']) > 20)) $msg .= Msg_Err('Ο κωδικός πρόσβασης πρέπει να είναι μεταξύ 5 και 20 χαρακτήρων!'); 
if (!$msg && ($_POST['cpass'] != $_POST['pass'])) $msg .= Msg_Err("Ο κωδικός πρόσβασης και κωδικός επιβεβαίωσης δεν ταιριάζουν μεταξύ τους."); 
        if (!$msg) { 
            $stub = db_select('ar_members', 'id', "email='$_POST[email]'"); 
            if (mysql_num_rows($stub)) $msg = Msg_Err('Αυτό email χρησιμοποιείτε ήδη σε κάποιον άλλο λογαριασμό!'); 
        } 
        if (!$msg) { 
            $pass = plx_encrypt($_POST['pass']); 
            $freedays = GetConfig('freeperiod'); 
db_insert('ar_members', 'account, email, pass, timezone, expires', "0, '$_POST[email]', '$pass', $_POST[timezone], DATE_ADD(NOW(), INTERVAL $freedays DAY)"); 
            $memid = mysql_insert_id(); 
            $_SESSION['userid'] = $memid; 
            $signupsubj = GetConfig('mail_signup_subj'); 
            ProcessConfig($signupsubj); 
            ProcessUserInfo($signupsubj); 
            $signupmsg = GetConfig('mail_signup_msg'); 
            ProcessConfig($signupmsg); 
            ProcessUserInfo($signupmsg); 
            $headr  = "MIME-Version: 1.0rn"; 
            $headr .= "Content-type: text/html; charset=iso-8859-7rn"; 
            $headr .= "From: $name $surname<$email>rn"; 
            @mail($_POST['email'], $signupsubj, $signupmsg, GetConfig('msgheaders')); 
            header("Location: index.php?s=signup_ok&memid=$memid"); 
            die(); 
        } 
    } 
    $html = GetPageContent('signup', $msg ,$headr); 
    return $html; 
}
Sorry for my english
Thanks ocZio
zoomm is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Problem with encoding in signup form
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.14300 seconds with 12 queries