How nes-di/todolist-php works
This is a PHP task-list application with a browser workflow for viewing tasks and submitting new ones. The sampled runtime loads tasks from MySQL, computes counts, and renders an HTML list; submissions are validated and inserted before redirecting back to the list. The README describes an earlier, in-memory teaching version, so the graph follows the provided source excerpts where they differ. The stylesheet is documented, but its implementation was not sampled; test and other unsampled behavior are omitted.
Main entry points: index.php Task page · entete.php Page header · ajouter.php Add task handler · donnees.php Task retrieval
Components 11
Web interface
- Task page
index.php - Page header
includes/entete.php - Page footer
includes/pied.php - Page styles
assets/style.css
Task handling
- Add task handler
ajouter.php - Task retrieval
donnees.php - Task and HTML helpers
fonctions.php
Database access
- DB configuration
config.php - PDO connection
connexion.php
Other components
- Browser user
- MySQL database
Connections 13
- Browser user → Task page: requests page
- Task page → Task retrieval: loads tasks
index.php - Task page → Task and HTML helpers: computes and escapes
index.php - Task page → Page header: includes
index.php - Task page → Page footer: includes
index.php - Task page → Add task handler: submits form
index.php - Page header → Task and HTML helpers: escapes title
includes/entete.php - Page header → Page styles: loads stylesheet
includes/entete.php - Task retrieval → PDO connection: opens connection
donnees.php - Task retrieval → MySQL database: reads tasks
donnees.php - Add task handler → PDO connection: opens connection
ajouter.php - Add task handler → MySQL database: inserts task
ajouter.php - PDO connection → DB configuration: loads settings
connexion.php