I've got a profile page that shows a users current account number in an input field. The user can change this account number and submit the form to update the database with their new account number.
What I need to do is get the initial account number, as well as the new submitted account number so I can use them in another script that runs on the same page.
$user = Am_Di::getInstance()->auth->getUser();
$oldnum = $user->accountnumber;
$newnum = $_GET['accountnumber'];
$client2 = $api->findClient( mlApi::LICENSE_ACCOUNT, $oldnum );
$client = array( 'account_no' => $newnum, 'real_demo' => '1', 'comment' => 'test2' );
$api->updateClient( mlApi::LICENSE_ACCOUNT, $client2[_index], $client );