This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Our search functionality is working great. The only issue we’ll see is if our search results return more than 8 items. We only show the first 8 items, but our link to the second page does not keep our search term. We need to finish integrating our pagination with our search results.
Example Code
$pagination .= "s=".$search."&";
if (!empty($search)) {
$limit_results = "s=".urlencode(htmlspecialchars($search))."&";
} else
Additional Suggestions
- Display the title along with the thumbnail on the catalog listing pages.
- Search in more than just the title so someone could search by author or movie star.
- Add a dropdown of categories to the search form and allow users to narrow their search.
- Create advanced search feature such as the use of a wildcard within the search term.
- Allow the user to choose how many items they would like to have displayed on each page.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up