Please see the attached export of my current database (4 tables).
I would like a user to be able to run a report on `messages_sent` via a front end.
They must login via their username and password which will return a user ID if correct.
From there, they should be able to run a report on `messages_sent`. They should be able to filter by `api_key`, `route`, `timestamp` (from) and `timestamp` (to) WHERE `reason_code` = 0.
The report should return `api_key`, `to`, `message`, `sender_id`, `route`, `submission_reference` and JOIN `messages_sent`.`unique_submission_reference` ON `delivery_receipts`.`dlr_refid`.
There may be more than one row in `messages_sent` for the same `dlr_refid`. It will therefore need to show the latest one and show `dlr_status` and `dlr_final`.
It also needs to show the number of credits used per report (1 per message sent) and always display a live total at the top.
The user should be able to export the report in CSV format.
It needs to be built in PHP and must be valid XHTML/CSS.
I am keen to use this: [url removed, login to view]