changed mysql to mysqli and added httprequest classes