Jump to content

External Conditional Coding??


mattpark

Recommended Posts

Hi All,

 

My web developers have left me stranded, so I need do a couple of the finishing touches myself. I wonder if you may help me?

 

Main Site - http://www.domain.com

WHMCS - secure.domain.com

 

On secure.domain.com we have a login box in the header. If a customer is logged in, this box is replaced for a nice "Welcome back customer" message.

 

Now i'm trying to replicate this functionality back on the main site... This is obviously complicated because WHMCS is separate from the main site.

 

Might anyone have a suggestion of which is the best way to achieve this?

 

Many thanks,

 

Matt

Link to comment
Share on other sites

Hi All,

 

My web developers have left me stranded, so I need do a couple of the finishing touches myself. I wonder if you may help me?

 

Main Site - http://www.domain.com

WHMCS - secure.domain.com

 

On secure.domain.com we have a login box in the header. If a customer is logged in, this box is replaced for a nice "Welcome back customer" message.

 

Now i'm trying to replicate this functionality back on the main site... This is obviously complicated because WHMCS is separate from the main site.

 

Might anyone have a suggestion of which is the best way to achieve this?

 

Many thanks,

 

Matt

 

 

<?php

require("../pathToWHMCS/dbconnect.php");

require("../pathToWHMCS/includes/functions.php");

require("../clients/init.php");

 

if ($_SESSION['loggedinstatus']=="true") {

echo "{$clientsdetails[firstname]}" ;

echo " ";

echo "{$clientsdetails[lastname]}" ;

}

?>

 

So simple. :) You can also play with the variables $clientdetails and more.

 

Regards,

Chris

Link to comment
Share on other sites

Hi Chris,

 

Many thanks for your reply, however I doesn't seem to be printing customer details if they are logged in to WHMCS.

 

To confirm pages are located as follows:

 

/home/username/htdocs/externaltest.php

/home/username/htdocs/secure/WHMCSINSTALL HERE

 

No error messages, just nothing is printed at all. If i swap if ($_SESSION['loggedinstatus']=="true") {, for false, it's not printed either?

 

Thanks for your help,

 

Matt

Link to comment
Share on other sites

  • 2 weeks later...

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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