Hi all,
Looking for some help on how to post the results from CKEditor back to a database.
This is so that users can amend their profile. The users data is read from the MySQL Database and displayed on the form.
I have put the field into a textarea and I can amend it using CKEditor... that works fine.
But how do I post the amended text back to the database when the user clicks the "Submit" button?
Can anyone please point me to an article/posting that explains?
(I am sure this has been answered loads of times, but I cant seem to find the answer anywhere)
Thanks...
Philip.
Looking for some help on how to post the results from CKEditor back to a database.
This is so that users can amend their profile. The users data is read from the MySQL Database and displayed on the form.
I have put the field into a textarea and I can amend it using CKEditor... that works fine.
But how do I post the amended text back to the database when the user clicks the "Submit" button?
Can anyone please point me to an article/posting that explains?
(I am sure this has been answered loads of times, but I cant seem to find the answer anywhere)
Thanks...
Philip.

Re: A Simple newbie question...
Right now, I'm assuming you need an editing page, and its corresponding "write-to" page.
If you're using php, I think you can just assign the $_POST results to a $variable:
if (array_key_exists('editor_data',$_POST)) {
//assuming your form is inserted and active, and that your submit <input> has name "submit"
//and that your text area is called "editor_data"
$editor_results = $_POST['editor_data'];
//rough query...new to this, too
$sql = SELECT * FROM your_table_name;
//INSERT or UPDATE here
INSERT INTO your_table_name $editor_results WHERE column_id = ColumnName ;
}
Good luck. Right now, I'm just trying to figure out what information is missing between the sample page's replace div example and the underlying coding that it refers to. Because, it's not working for me...
Re: A Simple newbie question...
Thanks for that. I might give that a try. However, I am frustrated that I cant get it to work the way it SHOULD work.
So I will continue to mess with the code to see if I can get it to work. If I succeed I will post the way I did it.
All the best,
Philip.
Re: A Simple newbie question...
take out CKEditor, just use a textarea. Now add the rest of your code so the user can save and edit the contents of that textarea. When you have that part ready add back the CKEditor call and it will work.
You'll find much more information about creating a CMS using textareas as that's a basic HTML element instead of searching for CKEditor.
Re: A Simple newbie question...