I have a client login form for whmcs, but when the client logs in, I want that form to disappear and display the clients name etc like "Welcome Danny". Anybody know how?

I have a client login form for whmcs, but when the client logs in, I want that form to disappear and display the clients name etc like "Welcome Danny". Anybody know how?
Hi
Hello,
The client homepage will be here:
/WHMCS/templates/[YOUR THEME]/clienthomepage.tpl.
Really easy to edit
PM me if you need anything else. I've spent too much time coding for WHMCS...
I'm not sure if we are talking about the same thing, but I appreciate your response. I have the following code:
<form method="post" action="##">
<input type="hidden" name="token" value="##" />
<section id="call-to-action">
<div class="row">
<div class="nine columns">
<h4>Email Address: <input type="text" name="username" size="20" /> Password: <input type="password" name="password" size="20" /><br />
</h4></div>
<div class="three columns">
<input type="submit" value="Login" />
Basically, once that user logs in, I would like that div to then hide the login form and display text such as "Welcome $clientid" or whatever the string is for whmcs.
Hi
Untested.HTML Code:<?php if( empty( $_SESSION['uid'] ) ) { ?><form method="post" action="##"> <input type="hidden" name="token" value="##" /> <section id="call-to-action"> <div class="row"> <div class="nine columns"> <h4>Email Address: <input type="text" name="username" size="20" /> Password: <input type="password" name="password" size="20" /><br /> </h4></div> <div class="three columns"> <input type="submit" value="Login" /> <?php } else { echo "Welcome back!" { ?>
Will test it shortly, much appreciated.Untested.HTML Code:<?php if( empty( $_SESSION['uid'] ) ) { ?><form method="post" action="##"> <input type="hidden" name="token" value="##" /> <section id="call-to-action"> <div class="row"> <div class="nine columns"> <h4>Email Address: <input type="text" name="username" size="20" /> Password: <input type="password" name="password" size="20" /><br /> </h4></div> <div class="three columns"> <input type="submit" value="Login" /> <?php } else { echo "Welcome back!" { ?>
---------- Post added 06-04-2013 at 07:15 PM ----------
@HarrySX - doesn't appear to work. The whole login form is hidden when logged in or out.
Hi
Thought I would share this as I just came across this thread again;
{if $loggedin}
<div></div>
{else}
<form>
</form>
{/if}
Hi
ok, the code I provided will work as long as WHMCS is installed on the same domain, it checks for an active WHMCS cookie session. I'm not sure why it didn't work for you but I see @Kieran; is viewing this thread so maybe he can help.
I haven't gave it another go since my first responce, I'll have another shot at it shortly.
Thanks for your help![]()
Hi
Want to hide these adverts? Register an account for free!