
October 24th, 2003, 10:10 AM
|
|
Junior Member
|
|
Join Date: Oct 2003
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Well it turns out that the code itself was the problem, so I had to re-script things and got it to work with this:
PHP Code:
<?php
mysql_connect (localhost, carlberg_admin, admin);
mysql_select_db (carlberg_cms);
if (isset($_POST['submit'])) {
mysql_query ("INSERT INTO about (Title, FullBody) VALUES ('".$_POST['title']."', '".$_POST['msgbody']."')");
//echo ($_POST['msgbody']);
}
include ('tmp/PageHeader.html');
?>
<form name="RichTextEditor" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return submitForm();">
<!-- PHP code: -->
<table width="500" cellpadding="3" border="0" cellspacing="0">
<tr>
<td colspan="2" height="75"> </td>
</tr>
<tr>
<td width="50">Title:</td>
<td><input type="text" name="title" size="30" class="formfield"></td>
</tr>
</table>
<BR><BR><BR>
<?
//the following line demonstrates removing carriage returns in preloaded content
//$sContent = str_replace(chr(13), "", "here's the ". chr(13) ."preloaded <b>content</b>");
?>
<?php include ('includes/rte.php'); LoadRTE("msgbody", $sContent, "", "", true); ?>
<!-- END PHP -->
<script language="JavaScript" type="text/javascript">
<!--
function submitForm() {
//call updateMessage to
updateRTE();
//change the following line to true to submit form
return true;
}
//-->
</script>
<noscript><p><b>Javascript must be enabled to use this form.</b></p></noscript>
<p><input type="submit" name="submit" value="Submit" class="formbutton"></p>
</form>
</body>
</html>
<?php
include('tmp/PageFooter.html'); ?>
--Adam
|