How bitwheeler7/expense_tracker works
This is a small PHP expense tracker: users register or log in, then view income and expense transactions, add entries, and delete them. The dashboard computes totals from the user’s transactions; PHP pages use a shared MySQL connection, session state, and shared page chrome. The graph follows references visible in the excerpts; the JavaScript and CSS contents were not sampled, so no behavior is attributed to them.
Main entry points: index.php Dashboard · login.php Login · db.php MySQL connection and session · add.php Add transaction
Components 13
Transaction workflow
- Dashboard
index.php - Add transaction
add.php - Delete transaction
delete.php
Shared presentation
- Page header
includes/header.php - Navigation sidebar
includes/sidebar.php - Page footer
includes/footer.php - Stylesheet
assets/css/style.css
Persistence
- MySQL connection and session
db.php - MySQL database
Other components
- User
Connections 28
- User → Register: registers
register.php - User → Login: signs in
login.php - User → Dashboard: views
index.php - Register → MySQL connection and session: loads
register.php - Register → MySQL database: inserts account
register.php - Register → Login: redirects
register.php - Login → MySQL connection and session: loads
login.php - Login → MySQL database: checks account
login.php - Login → Dashboard: redirects
login.php - User → Logout: signs out
- Logout → Login: redirects
logout.php - Dashboard → MySQL connection and session: loads
index.php - Dashboard → MySQL database: reads transactions
index.php - Dashboard → Add transaction: submits entry
index.php - Dashboard → Delete transaction: links deletion
index.php - Dashboard → Page header: includes
index.php - Dashboard → Page footer: includes
index.php - Add transaction → MySQL connection and session: loads
add.php - Add transaction → MySQL database: inserts transaction
add.php - Add transaction → Dashboard: redirects
add.php - Delete transaction → MySQL connection and session: loads
delete.php - Delete transaction → MySQL database: deletes transaction
delete.php - Delete transaction → Dashboard: redirects
delete.php - Page header → Navigation sidebar: includes
includes/header.php - Page header → Stylesheet: loads stylesheet
includes/header.php - Navigation sidebar → Dashboard: links dashboard
includes/sidebar.php - Navigation sidebar → Add transaction: links entry
includes/sidebar.php - MySQL connection and session → MySQL database: connects
db.php