Between 8:00 - 9:00 am ET on 10/25 we need to take our site down to make updates. We recommend logging out before 8:00am ET and not using your account during this time. Thank you for your patience while we make these important updates.

is it possible to return true or false for email check?

Go to solution
Regular Participant

is it possible to return true or false for email check?

I'm trying to wrap my head around the CC api in relation to checking an email address against a list, but I cannot for the life of me figure it out. Is it possible to return a simple true or false when submitting an email address in a form?


I've read this: but it has no actual implementation examples. Here's the code I've been trying, but it is not working.




$ccContactOBJ = new CC_Contact("basic", $cckey, $ccuser, $ccpass);

//if we have post fields means that the form have been submitted.
if(($_SERVER['REQUEST_METHOD']=="POST") && !empty($_REQUEST['member-submit'])) {
$contact = $ccContactOBJ->getSubscribers(urlencode($_POST['MemberEmail']));
if (empty($contact['items'])) {
$message = 'You have been added to our database.';
echo $message;
else {
$message = 'You are already listed in our database';
echo $message;


Thank you for the file,


I just reviewed it and found the login variable missing an 'e' in the name of the account.  After adding that in, I was able to make successful requests to our API.  


Please confirm this as a solution after you've tested.



Andrew Weber
Associate Product Manager for EventSpot

View solution in original post

Developer Portal

View API documentation, code samples, get your API key.

Visit Page