Added php for categories
fixed database