You are here: Re: Populating Web Pages from Spreadsheet « HTML « IT news, forums, messages
Re: Populating Web Pages from Spreadsheet

Posted by Beauregard T. Shagnasty on 12/05/06 15:30

payperclick.brandon@gmail.com wrote:

> Hoping someone could point me in the right direction.

I'll try.

> I want to build a product web page using data in a spreadsheet. I
> already have everything I want about each item in that spreadsheet
> i.e. Product Name, Product Description, Link to image, Price etc.

Sounds like a fairly common theme.

> I could easily build individual web pages, the problem is I have 7000
> rows in the spreadsheet. It seems like it would be far easier to have
> a single page that dynamically generates based upon the URL rather
> than lots of unique pages. (not worried about spidering for search
> engines etc.) Something like www.mysite.com/productid=9999 and then

Please use http://www.example.com/productid=9999 instead of mysite.com,
which is someone else's real domain name. "example.com/net/org" is
reserved for the purpose.

> having the web page do the equivalent of a vertical look up for the
> product with id 9999 and populate some variables throughout the
> webpage with the data associated with that product id.
>
> The specific reason I want to do this is to be able to quickly change
> all the web pages dynamically. Suppose I want to have a sale and
> lower all my prices by 10% for a weekend. Changing 7000 pages then
> changing them back would be a nightmare. Whereas changing the prices
> in Excel and uploading that spreadsheet is a snap.

I would use an online database, probably MySQL, along with PHP for your
scripting language. I would also use a table to hold data for
"discounts" with possible records as "all products" or even by single
product id.

The one script that builds the seven thousand pages reads the id number,
looks in the "discount" table for either "all" (and a percentage) or
that particular id, and writes the page using the Name, Description, and
this calculated price.

The image file? I would use the product id number as the file name -
9999.jpg - so you don't even have to store that data. Put all product
images in the same sub-directory. The script would look for a file with
this name, and if it exists, write out the HTML to display the graphic.

I would also write myself a few pages, using a script, to update this
database online, so I would not have to be uploading a spreadsheet all
the time.

> The actual website I am doing this with is not selling anything, so I
> am not concerned with SSL or other e-commerce factors. Can this be
> done using just Excel or do I need to use a database (something I

A database.

> know almost nothing about)? Does this require a more advanced
> programming language or can it be done in HTML? if not HTML which
> language is the most user friendly to accomplish this.

HTML is not a "programming" language, it is a HyperText Markup Language,
and can't "do" anything except display stuff.

Hope this helps.

--
-bts
-Motorcycles defy gravity; cars just suck

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация