Hey guys, I have started a new website written in html and a little bit of PHP and I have decided that I'll go for WHMCS as billing system. I have almost completed the integration with the the WHMCS and my main website, however there is one little thing that bugs me quite a bit. I have a login form on the main website index.php(not the WHMCS) that looks like this:
<div align="left"><form method="post" action="http:/mysite.com/accounts/dologin.php?goto=clientarea">
<input type="hidden" name="token" value="ee3109870cd9a8da0813754ad123397552561563" />
Client login: <br /><input type="text" name="username" size="10" value="Username">
<input type="password" name="password" size="10" value="******">
<input type="submit" value="Login">
</form></div>
e.g. the usual HTML login form which works perfectly with the WHMCS and correctly logs me to the client account. I have then implemented a IF statement im my header.tpl file of the template that looks like this:
{if $loggedin}
Welcome, {$clientsdetails.firstname} <td><a href="logout.php">{$LANG.logouttitle}</a></td>
{else}
which also works perfectly and shows in WHMCS the first name of the client that has logged in. However, here my problem: When i go back to my main website page(not whmcs) it doesn't show that this client has logged in. My question is how should I go for implementing something like the above IF statement in the header.tpl on my main index.php file. I'll really appreciate if someone has already solved that problem and shares that information