the post function client side