<?php
	/********** include infusionsoft sdk file****************/
include('library/src/isdk.php');

$app = new iSDK;
$app->cfgCon("ifconnection");

	/******************check ISDK connection*******************/


		//get the parameters passed by the infusionsoft http post
		$contactId = $_POST['contactid'];
		$tag = $_POST['_DayOfScienceVolunteerSchoolTag'];
		
										
		
		if($contactId && $tag)
		{
			$tag = (int) $tag;
			$contactId = (int) $contactId;		
		
			$result  = $app->grpAssign($contactId, $tag);		
		}

		//$tagID = 650;
	

		//now let's update the contact record
		//$conID  = $app->updateCon($contactId, $conDat);

		// update contact and tag
		//$result  = $app->grpAssign($contactId, $tagID);

		//$result  = $app->grpAssign($contactId, $conDat);

?>		