A refreshed core PHP QR generator that works cleanly on modern PHP, exports PNG files locally, and optionally stores a simple history in MySQL.
- safer request handling with CSRF protection and escaped output
- prepared statements instead of raw SQL inserts
- responsive generator UI with preview and recent history
- local file downloads instead of the old hard-coded remote URL
- database becomes optional for generation; if MySQL is offline, PNG export still works
- PHP 8.x with
mysqli,session, andgd - MySQL or MariaDB if you want database history
- write access to
userQr/
- Import
qrcodes.sqlif you want database-backed history. - Configure database credentials through environment variables or by editing
config.php. - Serve the project through PHP or Apache/Nginx and open
index.php.
Supported environment variables:
QR_DB_HOSTQR_DB_USERQR_DB_PASSQR_DB_NAME
- Generated PNG files are written to
userQr/. - The bundled QR library under
meRaviQr/was left in place to keep the update focused on the app layer.