Format item's array and post to php file.

1. Chnage to 1-dimension array before post to php file.
2. Add the post function.