This pull request adds a search functionality to the carsPHP application, enhancing the user experience by allowing users to filter the displayed cars based on specific criteria.
Key Features:
Search Bar Integration:
The search bar is integrated into the navbar on the main page (index.php).
Users can type a query into the search bar to filter cars based on the marca or cor.
Dynamic Filtering:
The search functionality dynamically filters the cars displayed in the table based on the user's input.
The filtering is case-insensitive and matches partial strings, providing flexible search capabilities.
SQL Query Enhancement:
The SQL query has been enhanced to include a WHERE clause that filters results based on the search query.
Prepared statements are used to safely handle user input and prevent SQL injection.
User Feedback:
When no cars match the search criteria, a message "Nenhum resultado" is displayed in the table.
This ensures users receive immediate feedback on their search actions.
Maintain Page Structure:
The search results are displayed within the existing table structure, ensuring a consistent user interface.
All relevant car details (ID, Marca, Cor, Ano, Preço, Usado, Adicionais) are shown for the filtered results.
How to Use:
Navigate to the main page (index.php).
Type a search query into the search bar located in the navbar (e.g., a car brand or color).
Press Enter in the search bar to trigger the search.
View the filtered results in the table below.
This search feature significantly improves the usability of the carsPHP application, making it easier for users to find specific cars based on their preferences.
Search Feature Description
This pull request adds a search functionality to the
carsPHP
application, enhancing the user experience by allowing users to filter the displayed cars based on specific criteria.Key Features:
Search Bar Integration:
index.php
).marca
orcor
.Dynamic Filtering:
SQL Query Enhancement:
WHERE
clause that filters results based on the search query.User Feedback:
Maintain Page Structure:
How to Use:
index.php
).This search feature significantly improves the usability of the
carsPHP
application, making it easier for users to find specific cars based on their preferences.