Every example here starts by including database.php, which creates the $pdo connection. Read that file first — it is short.
1-starthere.html — What you need before you begin
2.database.php — The connection filesimpleInsertExample.php — Insert, explainedinsertPlay.php — A hardcoded insert
7.simpleInsert2.php — Insert with named placeholders
8.submitExample.php — Inserting many rows in a loop
form.php — A form and its GET data
10.simpleSubmit.php — Form to databasesimpleSubmitPost.php.advanced.php — Several forms on one page
properQuery.php — Why you must use placeholdersfunctions.php — Putting queries into reusable functions
14.error.php — A shared "no permission" error page
15.settings.php — Loading site settings from a tableapidemo/ — Separating queries into an API file12-explodeImplode.php — explode() and implode()10-ajaxExample.html — A first taste of Ajax with a database
11-ajaxExample2.html — Ajax lookup by last name
sql-recap/ — SELECT, INSERT and DELETE side by sideThe full Ajax section lives in 3 · Advanced.