About flow from javascript to php using json