Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How do I store and extract text with links in it in a database

Engaged ,
Jan 07, 2011 Jan 07, 2011

I am looking at creating a page that looks and acts like a Wiki page. I thought that one way would be to have a database containing the text and another holding the result that would appear when a link is clicked

I have no difficulty in processing links from dynamic sources, but I am struggling to work out the data structure needed to store and recover the links themselves, as they will be mixed with text that is not link text.

Example as it should be reproduced (the links are dummies and will fail)

Little Jack Horner sat in a corner eating his curds and whey.

Each link would point to a record in my database containing the required data.

How do I store the line above in my database in a such way that it can be pulled out and displayed with a minimum of processing?

TOPICS
Server side applications
620
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 07, 2011 Jan 07, 2011

whatalotofrubbish wrote:

How do I store the line above in my database in a such way that it can be pulled out and displayed with a minimum of processing?

Store it as HTML.

You can type the HTML manually in your insert form (tedious), copy and paste from a page in Dreamweaver (not quite so tedious), or install an HTML editor in your insert form. Popular HTML editors for forms are CKEditor and TinyMCE.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 07, 2011 Jan 07, 2011

What a good idea!

I will examine TinyMCE as it is free.

CKEditor looks like it could be easier to install, but it costs more than I can afford.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 08, 2011 Jan 08, 2011
LATEST

whatalotofrubbish wrote:


CKEditor looks like it could be easier to install, but it costs more than I can afford.

The CK Editor is available either under an open source licence (free) or a closed commercial one (not free).

http://ckeditor.com/license

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines