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();
}
For testing, I display $contactXML out of both my page and simple_form.php. It looks the same in each. Yet simple_form is working, and mine isn't. Are these changes I mention screwing me up? I'd like to keep my hands off the dozen or so "designer" forms that feed into my response page.
Any help would be appreciated.
... View more