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 trialAlvin Hue
4,496 Pointscatalog.php view details
When I am on the catalog.php page, when I clicked the individual items it didn't direct me to details.php page, I think it will be more practical to make this works, the problem is I don't know how to do it, anyone can help? Thanks!
2 Answers
Jeremey DuVall
11,987 PointsThe full output for get_item_html()
should look like this:
$output =
"<li><a href='"
. 'details.php?id='
. $id
. "'><img src='"
. $item['img']
. "' alt='"
. $item['title']
. "' />"
. "<p>View Details</p>"
. "</a></li>";
That's working for me!
Simon Coates
28,694 Pointsdid you see the teacher's note on https://teamtreehouse.com/library/build-a-basic-php-website/listing-and-sorting-inventory-items/displaying-item-details ?
Brad Barnes
Courses Plus Student 2,916 PointsI'm having this problem too, and I have updated the functions.php page with the teacher's notes. So when I click on the links for details nothing happens
Brian Patterson
19,588 PointsBrian Patterson
19,588 PointsI have the same question. Did I miss something. If you click "view details" it does not direct you to the details.