Fixed a bug when saving the exception type

Change the method from "gettype" to "get_class" to properly save the
class of the exception.
Fixed bugs with database interaction
Improved error messaging
Now using $_REQUEST

Instead of $_GET and $_POST directly