Have som problems here. The code:
PHP Code:
if ($_REQUEST['do'] == 'pres')
{
$profile_res = $db->query_first("SELECT `field6` FROM `" . TABLE_PREFIX . "userfield` WHERE `userid` = ".$vbulletin->userinfo['userid']." LIMIT 1");
$profile_data = $profile_res['field6'];
require_once(DIR . '/includes/functions_editor.php');
$editorid = construct_edit_toolbar($profile_data,1,'signature',1,1,($vbulletin->userinfo['userid']));
$templater = vB_Template::create('profile_cp');
$page_templater = vB_Template::create('profile_cp');
$page_templater->register('messagearea', $messagearea);
$page_templater->register('editorid', $editorid);
}
if ($_REQUEST['do'] == 'updatepres')
{
$profile_data = $_POST['message'];
$db->query_write("
UPDATE " . TABLE_PREFIX . "userfield
SET field6 = '" . $profile_data . "'
WHERE userid = " . $vbulletin->userinfo['userid'] . "");
header('Location: profile.php?do=pres');
}
When i submit, the data in $_POST['message']; is not the new data from en textarea, it is the old in $profile_data.
Any ideas?
EDIT: It's only in the WYSIWYG-mode that it refuses to save the new data. In the regular mode where the bb-code is visible unformatted it saves without problems.