<?php

include('library/src/isdk.php');

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

//$_POST['opportunityid'] = 54;
//$_POST['stageid']       = 30;

$opportunityId = $_POST['opportunityid'];
$stageId       = $_POST['stageid'];

if($opportunityId)
{
	$opportunitydata = array('StageID'  => $stageId);
	$app->dsUpdate("Lead", $opportunityId, $opportunitydata);
}