KMETAVZER Posted February 12, 2012 Share Posted February 12, 2012 Hallo, I have a question, I've made this script, and I've put it on the page "clientareahome.tpl". {php} $userid = $this->_tpl_vars['userid']; $result = mysql_query("SELECT id FROM tblinvoices WHERE userid=$userid"); $totalnuminvoices = mysql_num_rows($result); echo "<p>Number of Invoices: <a href=\"clientarea.php?action=invoices\"><strong>". $totalnuminvoices ."</strong> - View »</a></p>"; $result = mysql_query("SELECT id FROM tblemails WHERE userid=$userid"); $totalnumemails = mysql_num_rows($result); echo "<p>Number of Emails: <a href=\"clientarea.php?action=emails\"><strong>". $totalnumemails ."</strong> - View »</a></p>"; echo "USERID=". $userid; {/php} Here working all except the this line: $userid = $this->_tpl_vars['userid']; Here is the template syntax: http://docs.whmcs.com/Template_Syntax Somebody know how to solve the problem ? Thank you for any suggestion. 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted February 13, 2012 Share Posted February 13, 2012 $userid = $this->_tpl_vars['clientsdetails']['userid']; 0 Quote Link to comment Share on other sites More sharing options...
KMETAVZER Posted February 14, 2012 Author Share Posted February 14, 2012 Now it works, but maybe the example into docs need to be updated. Thank you very much. 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.