- // Drop a message in the admin's area
- $result = SQL_QUERY_ESC("INSERT INTO "._MYSQL_PREFIX."_task_system (userid, assigned_admin, status, task_type, subject, text, task_created) VALUES ('%s', '0', 'NEW', 'SUPPORT_MEMBER', '%s', '%s', UNIX_TIMESTAMP())",
- array($GLOBALS['userid'], addslashes($subj_a), addslashes($_POST['qsummary'].":".$_POST['qdetails'])), __FILE__, __LINE__);
+ // Send mail to admin
+ sendAdminNotification($subj_a, $a_tpl, array('text' => postRequestElement('qdetails')), getMemberId());
+
+ // Send mail to user
+ sendEmail(getMemberId(), $subj_m, $message_m);
+
+ // Drop a message in the admin's area (we ignore the task id here)
+ createNewTask($subj_a, postRequestElement('qsummary') . ' : ' . postRequestElement('qdetails'), 'MEMBER_SUPPORT', getMemberId());