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

PHP Build a Basic PHP Website (2018) Listing and Sorting Inventory Items Item Details and Redirection

treeyon 94
treeyon 94
14,715 Points

Browser is linking to catalog page if i paste the url: http://localhost/homepage/s1v1/details.php?id=101

i have the same code. The Error seems to be in another page, but i can't find it. If i paste the url: http:/.../.../.../details.php, i get the field but without content of course. Thanks for help

Sergey Podgornyy
Sergey Podgornyy
20,660 Points

Can you provide your code of your project? If you are intresting, you can compair your code with mine: https://github.com/SergeyPodgornyy/treehouse-php-projects/tree/master/Basic-PHP-Website

Jessica Murillo
Jessica Murillo
9,119 Points

I was getting the same error and did not notice that I had accidentally put the details.php file into my includes folder. Maybe that might be it? Plus this might be a little late.

1 Answer

Ernests Millers
Ernests Millers
7,184 Points

Hey man, I had the same problem and it probably is because you include 'inc/data.php' after if statement'. It should be right after include 'inc/functions.php';