Jump to content

Logged in Hello and Client Name should display to wordpress or html website homepage


bagfuloz

Recommended Posts

Hello Everyone, Hope you guys doing good, WHMCS going so far, but some more tweaks need to be done!

 

small-screen.JPG

 

How to show logged in Hello and client name to wordpress or html website hompage, as per old thread, some guys did this in older version of whmcs ex - 4.0 whmcs. but many things has been depreciated in ver - 7. You can check the same below code and thread

 

As per older thread - https://forum.whmcs.com/showthread.php?48351-Possible-to-show-quot-Welcome-back-name-quot-otherwise-show-login-form

 

 

<?php

 

include("dbconnect.php");

 

if ($_SESSION['uid']) {

 

$result = mysql_query("SELECT firstname FROM tblclients WHERE id='".$_SESSION['uid']."' LIMIT 1;");

 

while($row = mysql_fetch_array($result))

 

echo "<p id='login'><span class='loginwelcome'>".$_LANG['welcomeback'].', '.$row['firstname'].': | <a href="/YOURWHMCS/clientarea.php">'.$_LANG['clientareatitle'].'</a> | <a href="/YOURWHMCS/logout.php">'.$_LANG['logouttitle'].'</a></span></p>';

 

}

 

else{

 

echo '<form action="https://www.YOURSITE.com/YOURWHMCS/dologin.php" method="post" name="loginform" class="header">Client Login:

 

<input name="username" type="text" class="login" id="username" value="username" size="15"">

 

<input name="password" type="password" id="password" value="xxxxx" size="15"">

 

<input type="hidden" name="token" value="add-your-token-here" />

 

<input type="image" src="/images/go.gif" width="25" height="19" align="absmiddle">

 

</form>';

 

}

 

?>

 

 

i tried this code by making a new php file in whmcs directory. Used - from include("dbconnect.php"); to include("init.php");

 

But there is something more need to done! please suggest and share your idea.

 

Thanks

Madan Malhotra

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated