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
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
This should do the job for you
{if $loggedin}
Welcome back, {$clientsdetails.firstname} {$clientsdetails.lastname}
{/if}
█ TsHosting & Web Design | Custom Mods | Header/Footer Integrations
█ Template Editor | Maintenance Mode V1.0.2 | PayPal Balance V1.0 | ClientArea Popups
█ Plan Comparison | Client Area Home Page | DEFSPARK - Custom Cart Template | Custom PDF Invoice | ErrorPages | TrusticoSSL Module
Legend
Had a mind fart before
Thanks mate
what if the website is form another location? forexample its located in my hosting main website? how can i show the username?
Try:
PHP Code:
<?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]}");}
?>