Code rebased uses php json encode

used a array to hold all the pilots fields.