andreic Posted February 27, 2014 Share Posted February 27, 2014 Hello, I tried to find a solution how to use $_SESSION['uid'] outside of WHMCS. I wanted to make a login form in wordpress, but I can't use the session to check if the user is logged in or not. I tried to use this in a file created inside of whmcs directory and to included in header of wordpress: <?php require("dbconnect.php"); if ($_SESSION['uid']) { echo "whmcs user logged in"; } else { echo "whmcs user not yet login"; } ?> But it's not working. If I put require dbconnect.php, it's appearing Down for Maintenance (Err 2) An upgrade is currently in progress... Please come back soon... Can someone help me, please? Thank you, Andrei 0 Quote Link to comment Share on other sites More sharing options...
mvpro2 Posted February 28, 2014 Share Posted February 28, 2014 You can create a php file and function inside your WHMCS folder that will echo document.write Javascript code. Reference this php file from Wordpress as: <script type="text/javascript" src="http://whmcs-url/yourcustom.php"></script> 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.