Hallo iedereen.
Ik heb een vraagje. Het lukt mij niet om de TinyMCE inhoud te posten en te inserten in een MySQL row.

Mijn script:
<?php
include $_SERVER['DOCUMENT_ROOT'] . '/includes/document_head.php'; 
?>

<?php
if(!empty($_GET["action"])){
$editor = htmlentities($_POST["editor_data"]);
echo $editor;
mysql_query("UPDATE gamesettings SET value = '$editor' WHERE name = 'lolz'");
echo "				<div class=flat_area grid_16>
					<p><strong>Opgeslagen!</strong></p>
				</div>";
}
$result_editor = mysql_query("SELECT * FROM gamesettings WHERE name = 'lolz'");
$row_editor = mysql_fetch_array($result_editor)
?>

				<div class="box grid_16 round_all">
					<h2 class="box_head grad_colour round_top">Editor</h2>
					<a href="#" class="grabber">&nbsp;</a>
					<a href="#" class="toggle">&nbsp;</a>
					<div class="block no_padding">
						<form name="editor" action="page.php?p=editor&action=save" method="post">
						<textarea id="tiny_input"  name="editor_data"><?php echo $row_editor["value"]; ?></textarea>
						<input type="submit" value="Opslaan">
						</form>
					</div>
				</div>
				<div class="flat_area grid_16">
					<p><strong>Note:</strong> TinyMCS <strong>does not support iOS devices</strong> at this time. It displays just fine but cannot call the keyboard up for editing. TinyMCE should have a fix for this fairly soon.</p>
				</div>
			</div>
		
			<script type="text/javascript">
			new TINY.editor.edit('editor',{
				id:'tiny_input',
				height:200,
				cssclass:'te',
				controlclass:'tecontrol',
				rowclass:'teheader',
				dividerclass:'tedivider',
				controls:['bold','italic','underline','strikethrough','|','subscript','superscript','|',
						  'orderedlist','unorderedlist','|','outdent','indent','|','leftalign',
						  'centeralign','rightalign','blockjustify','|','unformat','|','undo','redo','n','image','hr','link','unlink','|','cut','copy','paste','print','|','font','size','style'],
				footer:false,
				fonts:['Arial','Verdana','Georgia','Trebuchet MS'],
				xhtml:true,
				cssfile:'style.css',
				bodyid:'editor',
				footerclass:'tefooter',
				toggle:{text:'source',activetext:'wysiwyg',cssclass:'toggler'},
				resize:{cssclass:'resize'}
			});
			</script>

		</div>


Alvast bedankt :)

Groetjes,
Roy

Reageren