/    Sign up×
Community /Pin to ProfileBookmark

HELP – Info on how to read elements of a database file into HTML

Info on how to read elements of a database file into HTML

Here’s what I need to do, I have a product inventory of 500 items, and several web pages in which they are contained. I would like all product information in a CSV type file so I could then get the HTML page to read this file some how and display the results of certain elements at a time.

ie

ID, Description, Price, Image,
00001, Mens Coat, $80.00, ../images/00001.jpg
00002, Ladies Coat, $50.00, ../images/00002.jpg

ie currently it’s like this,

<TR>
<TD>
<div align=”center”><img src=”images/00001.jpg” width=”250″></div>
</TD>
<TD><P><font size=”4″><strong>00001</strong></font></p>
<UL>
<li><P>Mens Coat.</p></li>
<LI>Price: US$80.00</LI>
</UL>
</TD>
</TR>

But I would like this information inserted from a database so I only have to update one file rather than having to update 500 elements over 20 html files.

Anyone got any ideas???

I have looked through the forum, but there is so much of it and I don’t know what I’m looking for.

Thanks

Stu

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@CharlesSep 02.2004 — I'd markup the data in XML and then use XSLT to crank out the HTML, but any server side scripting will do. What do you have available?
Copy linkTweet thisAlerts:
@spacemanstuauthorSep 02.2004 — Thanks Charles,

I'm not sure my isp has any server side stuff available, it's not like I need to change it that often, it would be nice to just edit the one file instead of 20!!

I'll have a look at that XSLT


Stu
Copy linkTweet thisAlerts:
@CharlesSep 02.2004 — I have the same situation and I do my XSL transformations on my desktop and then upload the result.
Copy linkTweet thisAlerts:
@spacemanstuauthorSep 02.2004 — any chance of an exanple of the file I need to use and the syntax??


Cheers,

Stu
×

Success!

Help @spacemanstu spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...