Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

Joe Keogh
Joe Keogh
892 Points

Display information about store item [Php & SQL]

I'm wanting to learn how to display the data for a store item that a user has selected. For example on the Adidas website, once you have selected a shoe it will display a product information page with the data about that particular shoe [https://www.adidas.com/us/men-originals-shoes]. I've looked for tutorials but can't seem to find anything, most likely because I'm not wording the question correctly. If anyone could help me please do! Thanks.

2 Answers

Are you updating information to the page or do you only wish to view it? Have you tried looking for the answer in MDN? Here's a link how to update the info. Perhaps you can start here and if this is not what you need, it may provide a start:

https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Fetching_data

Joe Keogh
Joe Keogh
892 Points

At the moment I'm only trying to view. I'm trying to let the user select an item from page 1 (example) and then take them to page 2, where the browser will then display the data for that particular item. But i'll have look through the link and thanks!

Couldn't you just link the image to the page in HTML? To do so, you need to use <a href> for the web page you want attached to the image, and <img src> for the image you want clicked to get there, I think.