I have a lot of product thumbnails and I want to click on each thumbnail to open a page describing the product details.
How does this page generate different content based on different products?
I did it. Click on each thumbnail to open a larger version of each product, but how do you get a different description?
is not each picture corresponding product description content to use the database to save up? or save it with a TXT file?
And then open the thumbnail link to retrieve the appropriate description?
Ask for ideas. a novice.
Reply to discussion (solution)
One, each ID corresponding to the product data stored in the database.
Second, design a template
Third, obtain the corresponding information through the product ID fill in the template, output
1, like you said to save the data is necessary
2, you can open the thumbnail image when you bind each picture of the description of the content can also open a large map when you go to query
Well, that's the only way.
Thank you!
The database will be better, can be used jquery Ajax method, to the image of the onclick event, did not click once to request the database, and then return data (including the large image URL), displayed in the page
Of course to save to the database inside, through the ID query can be.
The database will be better, can be used jquery Ajax method, to the image of the onclick event, did not click once to request the database, and then return data (including the large image URL), displayed in the page
For beginners, don't talk about new knowledge that is too difficult for them.
In general this is the case. Each product must have data saved and each product has a unique ID value. Use this ID to search for content when you click on the thumbnail image.
Sql:
Select content from product where ' id ' = ' $id ';