I'm testing your API on my desktop with Windows 7 and IIS running PHP 5.3.5
Using your sample simple_form.php with cc_class.php works just fine. I can verify the hits to my account. Great!
But when I copy your code into my custom form in same directory and same cc_class.php, it's not working.
My file is the action/response screen to about a dozen slightly different input forms. Those forms are all straight HTML, outside contractor, not my responsibility. So I'm filtering the inputs on my page. My code should look familiar:
if (!empty($_POST)) {
$postFields = array();
$postFields = HTMLSpecialChars($_POST, ENT_QUOTES, 'UTF-8');
$postFields = HTMLSpecialChars($_POST, ENT_QUOTES, 'UTF-8');
$postFields = HTMLSpecialChars($_POST, ENT_QUOTES, 'UTF-8');
etc.
Another change I make is references to unused fields in $postFields throw "undefined index" errors, so I initialize them to null strings such as: $postFields = "";
The rest of it should be familiar
$contactXML = $ccContactOBJ->createContactXML(null,$postFields);
if (!$ccContactOBJ->addSubscriber($contactXML)) {
$error = true;
} else {
$error = false;
$_POST = array();
}
Without seeing all parts of the page that are related to Constant Contact, it makes it difficult to say what might be happening. Would you be able to paste or send the full contents of that page to our webservices support team so that we can take a closer look at this? Alternatively, if you wanted to send the value of $contactXML that would work as well, but sending the full page would be the most helpful.
Also, are you being presented with any kind of error message, or are you just not seeing the contact appear in your account?
If you have any other questions or concerns please let us know. Thanks.
David J
I appreciate the offer of help. I've sent off the relevant files to your support team.
Thanks so much.
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...
See Article