Generating HTML code snippets

  • Thread starter Thread starter tigerlily
  • Start date Start date
T

tigerlily

Guest
I am a beginner so please forgive me if I'm posting in the wrong place or if this question has already been answered.

I want to use an Access database to keep track of webpage content and to help generate HTML snippets. My webpage consists of a bunch of download files, and I will make a record for each file I offer for download (i.e., fields containing the actual file name, the sample image of the file, the name of what's being downloaded, etc.)

So, I would like to make an HTML code snippet from each record. Something like this:

{a href="filename"}Name of download{/a}{br}{img src="sampleimage"}

Can I have a template like the one above and have Access extract the information from the records? I want to be able to retrieve the HTML code snippets INDIVIDUALLY from each record, when I need it. How can I do this?

Thank you for your help!!!
 
tigerlily

I did something like this years ago (1997-98ish) for an internet company I was working for at the time.

We had a products database and we published new products onto the internet by generating the HTML from the database.

Do forgive me for not having any code examples and there is probably and much better way of doing this, but back then I wrote a loop which ran through the data in a recordset (based on a query to get the product data)
and outputted the data to a text file with the HTML tags around it.

This text file was built up from by using a header file (memo field with all the background colour logs etc.. in it) and footer file (another memo field with the end bits in) and my program just filled in the middle parts.

I think I used something like 'open' and used the 'write' statement but I dunno now. But I would look up the 'write' statement in the help. :confused:

The whole thing was then saved and FTPed on to the Webserver (along with the photos)

Hope this helps (i doubt it, but hey) :)

Brett
 
Last edited:

Users who are viewing this thread

Back
Top Bottom