I am curious to whether or not it is possible to make a CMS-styled page editor.
What I mean is, you have several pages in a database, and can edit their values.
I know how to do this… But here’s my real question…
How can I make a page creator, too?
For example… I have a title and a body for the page in a form…
I click submit (after filling it out), and it uploads the values to the database.
How can I make it create an entire PHP file based on what I submitted in the form?
Like, I want to create an about page…
So I fill out the title, “About Us”, and add a body, “This is our about us page!”…
From there, when I submit the form, it uploads to the database, then creates a file for it.
Like… An about-us.php.
How can I do that?
CAN it be done?
I have used the same method for this thing in the past, the “pretend” page.
I basically would just use some GET information to display the page.
Like… /page.php?title=About-Us.
From there, I can retrieve all the data.
I can do that just fine, but I want to know if there is another way…
Any ideas besides the GET “pretend” page?
Because, I want to use an actual URL like /about-us.php…
Instead of using it through GET.
If it is an editor you want to include in your page to design the page content (then stored in the DB) then I highly recommend ckeditor.
It is downloaded as javascript, works in a similar way to a WYSIWYG editor and when you hit the save icon it submits the form to the url in the action method.