connecting js object to php