The PHP code in this recipe used the PDO data object functions to communicate with a SQLite local file-based database. Learn more about PHP and SQLite at http://www.sqlitetutorial.net/sqlite-php/.
When SQLite isn't a solution (not supported by a web-hosting package), you may need to develop locally with a SQL Server, such as MySQL Community Edition or MariaDB, and then deploy with a live database server from your hosting company.
A good solution for trying things out on your local machine can be a combined web application collection, such as XAMP/WAMP/MAMP. Your web server needs to support PHP, and you also need to be able to create the MySQL databases: