<?php
   define('USER', 'jesse.turner@gatewaybaltic.com');
   define('TOKEN', 'reNaj8P1B4r3y9=fD8RaM0a4Lf30sdBda1d210we'); 
   require 'Solve360Service.php';
   
   $solve360Service = new Solve360Service(USER, TOKEN);
	   
   $upContact=$_GET["c"];
   $upData=$_GET["d"];
   $upFieldNum=$_GET["f"];
   $conNumber=$_GET["n"];
   
   $contactData = array();
   //echo $upContact.', '.$upFieldNum.', '.$upData;
   if ($upFieldNum=='4') $contactData['businessphonedirect'] = $upData;
   if ($upFieldNum=='5') $contactData['businessemail'] = $upData;
   if ($upFieldNum=='6') $contactData['website'] = $upData;
   if ($upFieldNum=='7') $contactData['custom4698752'] = $upData;
   if ($upFieldNum=='8') $contactData['assignedto'] = $upData;
   
   
   $contact = $solve360Service->editContact($upContact, $contactData);
   
   echo json_encode(array("$conNumber","$upFieldNum","$upData")); 
?>