Quantcast
Channel: WHMCS Community Forums
Viewing all articles
Browse latest Browse all 13458

localAPI addclient.

$
0
0
I'm trying the localAPI and I get the weirdest error message when I try to add a client. Mind you listing clients works fine.

$command = "addclient";
$adminuser = "Programmer";

$postfields["firstname"] = "Test";
$postfields["lastname"] = "User";
$postfields["companyname"] = "WHMCS";
$postfields["email"] = "demo@whmcs.com";
$postfields["address1"] = "123 Demo Street";
$postfields["city"] = "Demo";
$postfields["state"] = "Florida";
$postfields["postcode"] = "AB123";
$postfields["country"] = "US";
$postfields["phonenumber"] = "123456789";
$postfields["password2"] = "demo";
$postfields["currency"] = "1";

$results = localAPI($command,$postfields,$adminuser);
print_r($results);

Array ( [result] => error [message] => You did not enter your first name )

Why is this not working. firstname is obviously set.

Anyone?

using 5.2

Viewing all articles
Browse latest Browse all 13458

Trending Articles