![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2007
Posts: 2
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#2 |
|
Professional Programmer
|
How about you store the filename in mysql and just save the file like you would save any other html file.
__________________
JG-Webdesign |
|
|
|
|
|
#3 | |
|
Newbie
Join Date: Feb 2007
Posts: 2
Rep Power: 0
![]() |
Quote:
The storage of the contents from the WYSIWYG editor is what I need to figure out. |
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Store it in a file and put the filename in the DB. Oh, wait, that's what Wizard suggested.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
|
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
__________________
#programmingforums relay - http://thegupstudio.com/cgi-bin/pforelay.cgi freelance scripts - http://ryanguthrie.com/index.html |
|
|
|
|
|
#6 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
What would be the point of doing it this way? Why not just store it in a single TEXT or BLOB field?
|
|
|
|
|
|
#7 |
|
Professional Programmer
Join Date: May 2005
Location: Woo - Boot Sector!
Posts: 294
Rep Power: 4
![]() |
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:
__________________
www.heldtogether.co.uk |
|
|
|
|
|
#8 |
|
Unverified User
Join Date: Aug 2005
Location: none
Posts: 146
Rep Power: 0
![]() |
Why not just use MediaWiki?
__________________
Warning: My posts may change (dramatically) within the first 15 minutes they're posted. Got 'Nux?—GNU/Linux and other free software support. It's GNU/Linux, not just Linux. |
|
|
|
|
|
#9 |
|
Programming Guru
![]() ![]() ![]() |
Would be a could idea to split it out, just in case there was a search feature added later, based on category, author, etc.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#10 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to invoke static method from a Class object? | smith.norton | Java | 1 | Oct 5th, 2006 3:00 AM |
| Basic HTML Tutorial - Reuben Keeney | ReubenK | HTML / XHTML / CSS | 14 | Mar 26th, 2006 5:50 AM |
| HTML =/= Programming | Sane | Coder's Corner Lounge | 32 | Mar 8th, 2006 2:50 AM |
| Median/Mode in arrays? {Need help} | Java|Tera | Java | 27 | Nov 29th, 2005 10:50 AM |
| Debug recursion method() | pr0gm3r | Java | 3 | Oct 11th, 2005 12:33 PM |