Why is the Settings API is not saving my array of options

You have the name parameters set to “$id” which means that they’ll be things like “show_header_2” and such. You actually want them to be “second_section[show_header_2]” and similar instead, so that the array of settings is what you get back from the form.

error code: 523