Hi All
I'm trying to create a new contact - using a sample provided on the site (http://sourceforge.net/projects/ctctsampleforms/)
Here is my code:
<?php
include_once('cc_class.php');
$ccContactOBJ = new CC_Contact();
$ccListOBJ = new CC_List();
if (isset($_POST))
{
$postFields = array();
$postFields = $_POST;
$postFields = array(6);
$contactXML = $ccContactOBJ->createContactXML(null,$postFields);
if (!$ccContactOBJ->addSubscriber($contactXML)) {
echo $ccContactOBJ->lastError;
} else {
echo "Added";
}
}
else
{
?>
<form action="" method="post">
<input type="text" name="email_address">
<input type="submit" name="submit" value="submit">
</form>
<?php } ?>
When submit the form it comes back with message " An Error Occurred" - no more info about nature of the error.
I checked contact XML that gets sent to CC server - it seems to be ok and formed correctly. Login info is entered correctly as well - API key, u/p.
Any ideas what might be wrong? Any help will be much appreciated.
Vlad.
... View more