Terry Posted August 27, 2009 Share Posted August 27, 2009 Hello! I am trying to create something so that when the client is logged in it will show their name on all my pages, I am using the code: {if $loggedin}Hello! {$clientsdetails.firstname} {$clientsdetails.lastname} {else} Hello Guest!{/if} However when I look at the page its outputting the code and not actually doing anything. Any ideas why this is happening? ( I am not the best at PHP ) 0 Quote Link to comment Share on other sites More sharing options...
Impact-John Posted August 27, 2009 Share Posted August 27, 2009 well as long as the page is within whmcs DIR that should work fine 0 Quote Link to comment Share on other sites More sharing options...
Terry Posted August 27, 2009 Author Share Posted August 27, 2009 (edited) Ah right this is probably why, is their a way to do it if the page is not in the directory? Edited August 27, 2009 by Terry 0 Quote Link to comment Share on other sites More sharing options...
Impact-John Posted August 27, 2009 Share Posted August 27, 2009 you could always build your site within whmcs that way all whmcs codes will work within your site you can follow my sig if you want as well to see 0 Quote Link to comment Share on other sites More sharing options...
atDev Posted August 28, 2009 Share Posted August 28, 2009 Store it in a cookie accessible on your entire domain. 0 Quote Link to comment Share on other sites More sharing options...
Terry Posted August 30, 2009 Author Share Posted August 30, 2009 Thanks, I have decided to use PHP Sessions to get the users ID then query the database for the info needed 0 Quote Link to comment Share on other sites More sharing options...
ssswdon Posted August 31, 2009 Share Posted August 31, 2009 I don't mean to hi-jack this thread but I have a similar issue. I have created a page with some of the tags like the following. It seems the server doesn't know about the tags and I get a error. I have the file placed in the whmcs folder and have also tried with std header used on the php part of a template. Any thoughts on this {if $loggedin}Hello! {$clientsdetails.firstname} {$clientsdetails.lastname} {else} Hello Guest!{/if} 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.