Hi,

I'm looking to building a basic CMS using procedual PHP, however I'm unsure of how to write data to a database using a WYSIWYG editor such as CKEditor and then being able to view the data using the editor again to update it. Is there a tutorial anywhere on how to do this? I ran a Google search, but can't find much on it.

Also when creating a new page, how to specify where the page is to be created, so for example if it would sit under www.mywebsite.com/aboutme/myname.php or under www.mywebsite.com/news.php

I know host to post data from a form to a database, then how to read that data, so know a bit about how to go abouts it, but a tutorial would be good.

Hope that makes sense!

Thanks.

    Ckeditor, et all are nothing more than fancy textareas, so getting the data is nothing more than a regular form submission. From there, do your validation and save to the DB as normal.

    Your other two questions are more about how to write a CMS in general - if you haven't figured it out yet, you need to do more research. Download some existing CMS's and look at the source code/ database setup. Try to follow the code from where it receives the request to where it serves the page. You need to have all that figured out before you could begin.

    I've never seen tutorials on this, simply because it's such a large, complex task.

      Usually any tutorial on building a CMS is just showing how to make a rather basic blogging tool and does minimal handling of security.

        Ok I see, so basically I just replace the text area which writes to the database with a WYSIWYG editor. Yeah i'll take a look at some of the simpler CMS' to see how they are built. I'm not too bad on the security side of things, so hopefully should be able to make it fairly secure.

        Thanks both for your help!

          Generally, you don't need to replace the textarea, the Javascript-based WYSIWYG editor is already doing that automagically. Something like CKEditor is very good, but the other popular one is TinyMCE. Either one will do what you want however.

            Write a Reply...