Jump to content

Need help: what whmcs variable to use to populate remote server?


Recommended Posts



I would like to connect to a remote mysql server once module "create" is initiated but im having problem what variable (in color red) to use to populate the username, password, email and service in my remote server with the client values in his/her whmcs.


Please check the code below. please


function sample_CreateAccount($params) {
$dbhost = 'fake';
$dbuser = 'fake';
$dbpass = 'fake';
$dbname = 'fake';

$conn = mysql_connect($GLOBALS['db_host'], $GLOBALS['db_username'], $GLOBALS['db_password']);

mysql_query("INSERT INTO users (username, password, email, service) VALUES ('[color="red"]I dont know what variable name to use??[/color]')", $conn);

if ($successful) {
	$result = "Client Provisioning Successful";
} else {
	$result = "Client Provisioning Failed";
return $result;



Hope my explanation is clear sorry for my not so good english.


Thank you in advance to anyone who can help me, :-P

Link to comment
Share on other sites



Have you had a look at the action hooks? Should be fairly easy to get your code to work :)





function hook_create_forum_account($vars) {

   $firstname = $vars['firstname'];
   $lastname = $vars['lastname'];
   $email = $vars['email'];

   # Run code to create remote forum account here...




Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated