mattpark Posted June 22, 2008 Share Posted June 22, 2008 Hi All, My web developers have left me stranded, so I need do a couple of the finishing touches myself. I wonder if you may help me? Main Site - http://www.domain.com WHMCS - secure.domain.com On secure.domain.com we have a login box in the header. If a customer is logged in, this box is replaced for a nice "Welcome back customer" message. Now i'm trying to replicate this functionality back on the main site... This is obviously complicated because WHMCS is separate from the main site. Might anyone have a suggestion of which is the best way to achieve this? Many thanks, Matt 0 Quote Link to comment Share on other sites More sharing options...
chrismfz Posted June 22, 2008 Share Posted June 22, 2008 Hi All, My web developers have left me stranded, so I need do a couple of the finishing touches myself. I wonder if you may help me? Main Site - http://www.domain.com WHMCS - secure.domain.com On secure.domain.com we have a login box in the header. If a customer is logged in, this box is replaced for a nice "Welcome back customer" message. Now i'm trying to replicate this functionality back on the main site... This is obviously complicated because WHMCS is separate from the main site. Might anyone have a suggestion of which is the best way to achieve this? Many thanks, Matt <?php require("../pathToWHMCS/dbconnect.php"); require("../pathToWHMCS/includes/functions.php"); require("../clients/init.php"); if ($_SESSION['loggedinstatus']=="true") { echo "{$clientsdetails[firstname]}" ; echo " "; echo "{$clientsdetails[lastname]}" ; } ?> So simple. You can also play with the variables $clientdetails and more. Regards, Chris 0 Quote Link to comment Share on other sites More sharing options...
mattpark Posted June 23, 2008 Author Share Posted June 23, 2008 Hi Chris, Many thanks for your reply, however I doesn't seem to be printing customer details if they are logged in to WHMCS. To confirm pages are located as follows: /home/username/htdocs/externaltest.php /home/username/htdocs/secure/WHMCSINSTALL HERE No error messages, just nothing is printed at all. If i swap if ($_SESSION['loggedinstatus']=="true") {, for false, it's not printed either? Thanks for your help, Matt 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted July 1, 2008 Share Posted July 1, 2008 Make sure the paths are correct: require("../pathToWHMCS/dbconnect.php"); require("../pathToWHMCS/includes/functions.php"); require("../clients/init.php"); If your whmcs is http://www.ursite.com/whmcs/... then: require("whmcs/dbconnect.php"); require("whmcs/includes/functions.php"); require("whmcs/init.php"); 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.