added work with db on php side