HostingPup Posted August 16, 2008 Share Posted August 16, 2008 Hi all, Im currently customizing my layout of whmcs I want to add code that when a user is logged in i can pull thier name from the database for eg: Welcome back, Joe Blow Any idea's? thanks 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted August 16, 2008 Share Posted August 16, 2008 This should do the job for you {if $loggedin}Welcome back, {$clientsdetails.firstname} {$clientsdetails.lastname} {/if} 0 Quote Link to comment Share on other sites More sharing options...
HostingPup Posted August 16, 2008 Author Share Posted August 16, 2008 Legend Had a mind fart before Thanks mate 0 Quote Link to comment Share on other sites More sharing options...
LemonBarley Posted October 15, 2008 Share Posted October 15, 2008 what if the website is form another location? forexample its located in my hosting main website? how can i show the username? 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted October 15, 2008 Share Posted October 15, 2008 Try: <?php include("path/to/dbconnect.php"); include("path/to/includes/functions.php"); include("path/to/init.php"); if (!empty($GLOBALS['clientsdetails']['id'])) { echo("Welcome Back {$clientsdetails[firstname]} {$clientsdetails[lastname]}");} ?> 0 Quote Link to comment Share on other sites More sharing options...
steve182 Posted February 25, 2010 Share Posted February 25, 2010 This should do the job for you Would this be placed in the TPL file? 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.