Ajay
Ajay

Reputation: 705

cpanel xml-api php notice

I'm getting the following notice,

Notice: Use of undefined constant username - assumed 'username'

........

and the code that generates it,

$acct = array(username => $username, password => $password, domain => $domain);

Ami doing something wrong here. the original code had something like this,

$acct = array( username => "someuser", password => "pass123", domain => "thisdomain.com");

Thanks.

Upvotes: 0

Views: 220

Answers (1)

Connor Peet
Connor Peet

Reputation: 6265

Try quoting the key, like so:

$acct = array('username' => $username, 'password' => $password, 'domain' => $domain);

Upvotes: 1

Related Questions