![]() |
Storing HTML: What's the best method?
Well I'm building this application and I'm a little stuck right now. What I'm doing as part of my application is allowing users to write their own tutorials in the WYSIWYG editor then allowing them to submit the data from the editor into the PHP application I'm building.
What my question is what is the best way to store this data so I can display it later on and also give the users the ability to edit their tutorials in the future if they find an error? Is storing it into a mySQL field the best? Outputting the contents into an actual file? I'm not really sure and any guidance, suggestions are appreciated! Thanks, John |
How about you store the filename in mysql and just save the file like you would save any other html file.
|
Quote:
The storage of the contents from the WYSIWYG editor is what I need to figure out. |
Store it in a file and put the filename in the DB. Oh, wait, that's what Wizard suggested.
|
I'd probably go with storing it in a file and putting the filename in the DB
OR you could split each line of the file into its own db entry each html record has a db entry that consists of a list of line ID's correlating to the line stored ! To get the full html you retrieve the line with the correct ID and append them together! or you could just store it in a file and put the filename in the db |
Quote:
|
Is your userbase really going to want to code a tut in html? I would guess no, a little gem from my latest project: Text_Wiki. It parses wikitext (easy markup) to html at run time. It may take a bit of old-school hacking/butchering to get it exactly as you want it (if you take the unorthodox method of not using PEAR, but instead just including the class), but it works a treat!
This way you can keep control of the look of the site, and the authors can keep control of the content, the way it should be :banana: |
Why not just use MediaWiki?
|
Quote:
|
Quote:
|
| All times are GMT -5. The time now is 2:01 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC