Fixed an SQL Query to be database agnostic
Made submit path url creation host-agnostic