Hi i am trying to get arte editor to save data to mysql using a rte editor.
No matter how i try the post data is empty.
It’s driving me nuts i’ve googled for 2 days and not found a solution.
Surly missing something really simple.
Any help will be greatly appreciated
Geoff
<script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
//make sure hidden and iframe values are in sync for all rtes before submitting form
updateRTEs();
return true;
}
//Usage: initRTE(imagesPath, includesPath, cssFile, genXHTML, encHTML)
initRTE("../rte/images/", "../rte/cbrte/", ".../rte/rte.css", true);
//-->
</script>
<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>
<script language="JavaScript" type="text/javascript">
<!--
//build new richTextEditor
var rte1 = new richTextEditor('rte1');
//rte1.html = '';
rte1.toggleSrc = false;
rte1.build();
//-->
</script>
It’s nothing to do with php not working and $_GET and $_POST work with the form if i use a normal text area it’s only the rte editor that returns nothing
There are a couple of things which occurr to me, first add something like this before your if statement:
if (is_null($_Post’rtel’])) echo “<h1>RTE is empty!</h1>”;
Second, how are you handling the special formatting characters in the RTE? I would’ve expected to see some code stripping them out before trying to insert them into the db. But the fact that you aren’t seeing the mysql_error message leads me to think its more likely the first issue.
HTH
(I should point out I dont actually use RTE - I use FCKEditor )
I was wondering if Geoff got resolution to this issue of no data in _POST. I have the same issue with the same code (cbrte, cross browser rich text editor, from Kevin Roth). The _POST array contains the variable ‘element’ but with a empty string. I made the mistake of inserting html code (<input name=“test” type=“hidden” value=“test”>) into the submit_form() function, and lo and behold, _POST had the data.