PDA

View Full Version : Embed tags to call to db? and include text/link


BrightNail
06-06-2003, 01:25 AM
what is the best way to go about doing this...
Keep in mind that the owner must be able to change the link, link name as he/she pleases via an interface/admin tool.

example:

john doe went to the market at <insert link name and link here>, to buy some milk.

I think it would be best to include via the fileobject a text file with that information. The admin would just upload a text file to the site via upload button.

the admin would formulate the text file like so..

vons supermarket
http://www.vonssupermarket.com

I would then call that text file, reiterate thrut he lines..apply the first to the link name and the second line as the link.

what do you think...or perhaps...just make some db calls...but isn't there some security issues here?

bostjank
06-06-2003, 08:26 AM
I would simply put the link in a database. The link would then be easily retrieved from db and also changed by an administrator:


sSQL = "SELECT LinkHref, LinkName FROM links WHERE..."
set rs = conn.Execute(sSQL)

Response.Write "john doe went to the market at <a href=""" & rs(0) & """>" & _
rs(1) & "</a>, to buy some milk."

...

What security issues are you refering to? I don't think there is a bigger security issue if you use db instead of txt file. After all, you can password protect access to a database.

Bostjan

BrightNail
06-07-2003, 04:50 AM
thanks..hmm, I'll give it a go..I appreciate it.