Hey Guys! Wondering if maybe someone can help me out!
I'm trying to do something with API and i dont know why my code isnt working
basically i want the function to grab the user's ID# and then find them in the database. Now the only way that I can get the function to work is by actually setting the $conid inside of the function. eg: $conid = 198274;
Even thought when i echo the $conid it still displays...
So I'm getting an error:
ERROR: -1 - No method matching arguments: java.lang.String, java.lang.String, [Ljava.lang.Object;
And I'm guessing this error means that the $conid isnt set.
Here’s some code: FUNCTIONS.PHP
function getuser($sub, $conid) {
if (isset($sub)) {
// Connect to API
require("isdk.php");
$app = new iSDK;
$app->cfgCon("cashApp");
echo $conid;
$returnFields = array('Email', 'FirstName', 'Id');
$loadcon = $app->loadCon($conid, $returnFields);
THIS HERE DOESN’T MAKE THE UPDATE I JUST WANTED TO SEE IF IT WAS GRABBING DATA FROM INFUSION
echo "<pre>";
print_r($loadcon); THIS PRINTS THE RESULT
echo "</pre>";
// Update existing User
// $conDat = array('Email' => $email_2,
// 'FirstName' => $firstname,
// 'LastName' => $lastname);
// $conID = $app->updateCon($Id_2, $conDat);
} else {
echo "No Data.";
}
}
GETRICH_PROCESS_FORM.PHP
$submit = $_GET['Submit'];
$id = $_GET['Id'];
echo getuser($submit, $id);
PS. I have had this working on another site put was using the form function POST instead of GET. Would that make a difference?
Any input would be appreciated! Thanks alot!