This is a silly question and I will get some backlash for it, but I don't know how to ask the question in search bars, so I can't find the answer.
I'm trying to figure out how sites like ebay, pccasegear etc populate their product page with information about each specific item.
I know they obviously wouldn't have a html page for each product, which is ridiculous. So I assume they would have to have a single product page which was populated from a database by php or something like this.
My question is, how is this done? and how could I go about coding this without using php or using a database?
I ask this because I am required to code a website for my course, and it asks to have 12+ dummy products, and I do not want to create a html page for each product.
At a very high level: the data about each product is stored in a structured, computer-friendly format, not as HTML. Typically it will be stored in a database of some sort: SQL, NoSQL, whatever.
The product data is programmatically turned into HTML on-the-fly using some sort of HTML templating. It doesn't take much imagination to see how this part works. There's some "skeleton" structure (the template) into which the specific product information is substituted, using some sort of special placeholders.
Consider this totally-made-up template as an illustrative example:
<h1> {{ product_name }} </h1>
<p> {{ product_description }} </p>
– can you see where this is going?