Jump to content

HTML Style Tags in a MYSQL Table.


d239113g

Recommended Posts

I have a table in my mysql database which is CourseDetails. When a link is clicked, a page opens and the selected course, is displayed on the page. At the moment, i am having to Put html style tags in the table with the data, so it displays all nice and formatted. But is there anyway for say, somebody to enter the course data in a word document or text editor and then that goes into the the tables?.  At the moment it is fine as i have put the tags in and it comes out all formatted nicely, but it will be used eventually by people who would not know html code, so editing the course information, or adding a new course would prove to be a problem.

 

phpmyadminkx4.th.png

screenshotka6.th.png

Link to comment
Share on other sites

There are some ways to guarantee a nice output without the users having to learn HTML. One common way is the use of a WYSIWYS editor, similar to that one used in this forum, that hides all formatting codes like a word processor. The user can design his text as he likes, and the formatting codes can still be sent to the database without the user even seeing a bit of HTML. If this is what you need, you should research further on this topic.

 

However, depending on the grade of standardization of your content, it might be also an idea to split up all information into minimal bits, like header / teaser / paragraph or whatever you need, and store them as different data fields. The input then could be done without any style information, while the formatting information is added only at the output. If your content has always a similar structure, then I would advise using this method. Otherwise, if the formattings and the structure of your content differ very much, I would recommend the method above.

 

Content Management Systems use to combine both methods (having an extra field for page title, for example) and providing an WYSIWYG editor for the rest of the page. It's up to you :)

 

Link to comment
Share on other sites

All the pages differ slightly, with the content. Some will list modules for the course, some will list previous qualifications and experience, so the pages are not all formated the same. What i have done with the table is have a Title, which are all formatted the same, and then just put Section1 to Section10 as some courses have more information than others.

 

I am needing to create a content management system, so that Course Leaders can log-in to it, and then see the courses they are responsible for only, and then be able to edit, add, delete courses, then then update it to the database, so it can be displayed on the website.  a WYSIWYG editor sounds great, as they can edit text without having html code experience, but just wondering how when the page has been edited, or new page created, it is put into the database, and then onto the website, with the same formatting as was in the editor?

Link to comment
Share on other sites

All the pages differ slightly, with the content. Some will list modules for the course, some will list previous qualifications and experience, so the pages are not all formated the same. What i have done with the table is have a Title, which are all formatted the same, and then just put Section1 to Section10 as some courses have more information than others.

 

I am needing to create a content management system, so that Course Leaders can log-in to it, and then see the courses they are responsible for only, and then be able to edit, add, delete courses, then then update it to the database, so it can be displayed on the website.  a WYSIWYG editor sounds great, as they can edit text without having html code experience, but just wondering how when the page has been edited, or new page created, it is put into the database, and then onto the website, with the same formatting as was in the editor?

You can dump HTML code to and from a DB field.... but it sounds like it's going to be a mess.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.