msql to misqli + fix comment session