Why use a database?
Static pages are useful for information that changes rarely. A database becomes useful when a website needs to store, search, update or organise many records.
Examples
A business directory might store business names, categories, locations and descriptions. An online catalogue might store products and prices. A member system might store account and profile information.
PHP and MySQL
PHP can receive a request, query MySQL and turn the returned information into a page or dashboard. This creates a dynamic website rather than a collection of manually maintained pages.
Search and filtering
Database-backed search can allow visitors to filter information by category, location, keyword or other fields.
Data design matters
Good database structure makes it easier to maintain information, reduce duplication and extend the website later.
