Hello, first i am very newbie with mysql/php so i need a LOT of help, i intend to use FCKeditor to edit several diferent static pages on a website, and i think the best if to store the edited data in mysql and then post it in a page outputing it from mysql, but since i am very newbie at this i need help, first how i safe in mysql the data from FCKeditor? i have tryed some code i saw here but they dont work , its best to make a row for every website page? or a table to every website page? Can any of you give me any example of code to insert the date in mysql and to edit that date in FCKeditor? i really need help since i am king of new with all this, i thank you in advance for all, i really could use this if i can manage to work with it. please someone help me.
Fri, 07/28/2006 - 18:48
#1
RE: Help with php and mysql
Your first step should be figuring out the database... For what it sounds like you're trying to do I'd recommend one table with a row for each page, with each row consisting of just a unique ID (an integer with AUTO_INCREMENT set) and a text field (not char or varchar.)
If you decide you need to have more in your database than that, read up on Normal Forms before creating any additional columns or tables.
Then you'll need to make your pages, figuring out the dynamics of how you're going to bo displaying the text, and how/where/when you'll be showing the editor.
Then actually get the editor working within your pages where you want it.
Then and only then, start figuring out how to 'wire up' the editor so that it loads text from the database (using a SELECT SQL statement) and how it updates the database with entered text (using the INSERT and UPDATE SQL statements)
It'll be a lot of work if you're just learning this as you go, and you'll need to address the concern of how to control who can edit the text on these static pages.
For your time, effort, and the speed of your page, it may very likely be best to just use static pages edited with a basic HTML editor (such as Mozilla Composer, Macromedia Dreamweaver, or Microsoft Frontpage)
RE: Help with php and mysql