port ontherun.php to mysqli API (addresses #22)
port ontherun.php to mysqli API (addresses #22)

* ontherun.php:
  - use mysqli API instead of MySQL API
  - add mysql error handling (addresses #25)
  - reindent JavaScript
  - add TODO comments for input validation and potential refactorings
  - use flash message mechanism for displaying success and error
    messages

coffeestats/coffeestats,coffeestats/coffeestats,coffeestats/coffeestats