Hey Coders!
I have a really strange trouble with this function, and I'm all crazy now to try make it work.
here is the code:
<?
//import_request_variables("gP");
require '/usr/local/cpanel/Cpanel/Accounting.php.inc';
$host = "localhost";
$dbname = "*****";
$table = "******";
$link = mysql_connect ($host, "******", "******");
$queryext = "SELECT * from $table where (login='$login')";
$result = mysql_db_query ($dbname, $queryext, $link);
while ($row = mysql_fetch_array ($result)) { $login=$row[login]; $pass=$row[pass]; $dom=$row[domain]; $plan=$row[tarif] }
$usessl = 0;
$whmuser = "*******";
$accesshash = '***********';
print("Vars: $dom, $login, $pass, $plan");
createacct ($host,$whmuser,$accesshash,$usessl,$dom,$login,$pass,$plan);
?>
when I send from some form all 4 vars - $dom, $login, $pass, $plan, and disable dbquery - all work ok,
but when I send only $login and extract other 3 vars from db whm account don't creates
in both ways 'print' show all 4 vars
Can anybody say what the prob with my code?
Tnks!