This sample script only has the functionality for adding new customers. If a customer unsubscribes and than wants to be added back in, this is a form of an Update. Please see the documentation in the "Opting-in a Contact" section at the bottom of this page for more information for how to update and re-subscribe a contact.
Dave Berard Senior Product Manager, Constant Contact
Thank you, Mike. I was able to tailor that example to fit my needs.
One small error you may want to fix is that you are outputting the error message for "missing field" twice, because it is outputted immediately within the logic as well as later on in "echo $output;". Of course, that is a very small error in a very useful example file.
My client just informed me that their CC form is no longer working. I am using this example and it was working fine. Now I am getting a 401 authentication error. I haven't changed anything. Did something change on CC?