Please how to encoding to send message to iso-8859-7 and ti insert the From in below code?
Thanks
Code:
function Signup() {
$msg = '';
if (isset($_POST['editaccount'])) {
TrimRequest();
if (!$_POST['email']) $msg = Msg_Err('Email is required!');
if (!$msg) if ((strlen($_POST['pass']) < 5) || (strlen($_POST['pass']) > 20)) $msg .= Msg_Err('The password must be between 5 and 20 characters long!');
if (!$msg && ($_POST['cpass'] != $_POST['pass'])) $msg .= Msg_Err("The password and it's confirmation dosen't match!");
if (!$msg) {
$stub = db_select('ar_members', 'id', "email='$_POST[email]'");
if (mysql_num_rows($stub)) $msg = Msg_Err('Email already registered!');
}
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);
@mail($_POST['email'], $signupsubj, $signupmsg, GetConfig('msgheaders'));
header("Location: index.php?s=signup_ok&memid=$memid");
die();
}
}
$html = GetPageContent('signup', $msg);
return $html;
}
|