hostingames Posted January 28, 2015 Share Posted January 28, 2015 hi, need help thank you to integrate this code on HTML? $counter3 = mysql_query("SELECT COUNT(*) AS id FROM tblhosting WHERE domainstatus='Active'"); $num3 = mysql_fetch_array($counter3); $count3 = $num3["id"]; $this->assign('hostingtotal',$count3); on my page header.tpl the code works well. index.html fontionne not 0 Quote Link to comment Share on other sites More sharing options...
hostingames Posted February 1, 2015 Author Share Posted February 1, 2015 hi, I need to integrate this code on, html? thank you 0 Quote Link to comment Share on other sites More sharing options...
foka Posted February 2, 2015 Share Posted February 2, 2015 There would be two ways to do that. 1. To execute php code in html, you will need to put this code in your .htaccess file. AddType application/x-httpd-php .html .htm or 2. You can execute the code in php file and include it in html via iframe. 0 Quote Link to comment Share on other sites More sharing options...
hostingames Posted February 4, 2015 Author Share Posted February 4, 2015 hi, could you give me code, please thank you 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted February 4, 2015 Share Posted February 4, 2015 @hostingames, simply create activeClients.php inside your WHMCS main directory and place this code inside it: <?php require("init.php"); $counter3 = mysql_query("SELECT COUNT(*) AS id FROM tblhosting WHERE domainstatus='Active'"); $num3 = mysql_fetch_array($counter3); $count3 = $num3["id"]; echo "document.write('{$count3}');"; ?> in index.html you use the following code to display the result from activeClients.php file: <script type="text/javascript" src="http://yourwebsite.com/whmcs/activeClients.php"></script> this will do what you need 0 Quote Link to comment Share on other sites More sharing options...
hostingames Posted February 6, 2015 Author Share Posted February 6, 2015 hi, solved thank you 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.