From the course: PHP: Object-Oriented Programming with Databases
Unlock the full course today
Join today to access over 24,100 courses taught by industry experts.
Display a detail page - PHP Tutorial
From the course: PHP: Object-Oriented Programming with Databases
Display a detail page
- [Instructor] In the last movie, we created a new method which would find a record by its ID. I want to build on that and in this movie, I want to take that object that we've just instantiated and use it to display a detail page for the bicycle. In your exercise files, I've included a new file called detail.php which we can just drag into the public directory and then when we go into our project, it'll show up right there and you can see that it just has the same kind of thing we've been working with on other pages. It's got initialize.php, page title. It's got a public header. There's a footer at the bottom. It's got a link to go back to the inventory and then it's got code to display the details of a bicycle so we have to have a bicycle object and once we have that, it'll display its properties, the bike brand, the bike model, the year, the category, and so on all the way down the line so it's going to just display all the different properties of the bicycle. We first have to find…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.