Hi,
I am using FCKeditor v.2.3.1. I have it working perfectly. The only problem I have is that when selecting rows from the MySQL database, it will save the very first row, but not any other ones. My PHP script goes as follows:
<form action="posteddata.php" method="post" target="_self">
<br>
<input type="submit" name="Submit" value="Update">
</form>
The data posts from this form flawlessly as I have tested it numerous times. Once passed to my form script, I then execute this script:
$sValue = $_POST['PSP_editor'] ;
$posted_id = $_POST['page_id_value'] ;
mysql_connect("server URL", "user name", "password") or die ('I can?t connect to the database.') ;
mysql_select_db("clientd_psp") ;
$result = mysql_query("UPDATE content_tbl SET page_content='$sValue' WHERE page_id='$posted_id'") ;
My page ids start at 100, and it saves perfectly when the id in the query is 100, but when its another number other than 100 it doesnt save properly. Is there a quirk that I have not found in the editor or what? Any information is invaluable and greatly appreciated.
Thanks
John
I am using FCKeditor v.2.3.1. I have it working perfectly. The only problem I have is that when selecting rows from the MySQL database, it will save the very first row, but not any other ones. My PHP script goes as follows:
<form action="posteddata.php" method="post" target="_self">
<?php
mysql_connect("server URL", "user name", "password") or die ('I can?t connect to the database.') ;
mysql_select_db("clientd_psp") ;
$pagedid = $_GET['id'];
$posted_id = $_POST['id'];
$result = mysql_query("SELECT * FROM content_tbl WHERE page_id=$pagedid") ;
$row = mysql_fetch_array($result) ;
echo "<div style=\"font-size:18px;\">" . $row['name'] . "</div><br />" ;
$oFCKeditor = new FCKeditor('PSP_editor') ;
$oFCKeditor->BasePath = '/psp/fckeditor/' ;
$oFCKeditor->Value = $row['page_content'] ;
$oFCKeditor->Height = '500' ;
$oFCKeditor->Create() ;
echo ("<input type='hidden' value='$pagedid' name='page_id_value' />") ;
?>
<br>
<input type="submit" name="Submit" value="Update">
</form>
The data posts from this form flawlessly as I have tested it numerous times. Once passed to my form script, I then execute this script:
$sValue = $_POST['PSP_editor'] ;
$posted_id = $_POST['page_id_value'] ;
mysql_connect("server URL", "user name", "password") or die ('I can?t connect to the database.') ;
mysql_select_db("clientd_psp") ;
$result = mysql_query("UPDATE content_tbl SET page_content='$sValue' WHERE page_id='$posted_id'") ;
My page ids start at 100, and it saves perfectly when the id in the query is 100, but when its another number other than 100 it doesnt save properly. Is there a quirk that I have not found in the editor or what? Any information is invaluable and greatly appreciated.
Thanks
John

RE: editor only saves one record of in my DB
RE: editor only saves one record of in my DB