Fixed score not getting stored and php json output