This code I bought is really messy, need it cleaned up.
1) Abstract database connection to it's own config file
2) clean up code and improve performance
3) There is a bug that is dropping records that were recently put in not sure why it's doing this but the records work for a period of time then they disappear.