Corrected mysql to use mysqli as mysql is being depreciated
added variable dump and other debugging tools