Skip to main content
Inspiring
January 7, 2011
Question

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

  • January 7, 2011
  • 1 reply
  • 619 views

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?

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
January 7, 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.

Inspiring
January 8, 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.

David_Powers
Inspiring
January 8, 2011

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