Paul Haskett Posted September 25, 2014 Share Posted September 25, 2014 Hi I have been looking around for an answer but not had much luck. I have a WHMCS installation in a folder called WHMCS. I also have pages outside of this folder. The problem is when clients log in and tick the remember me box when they return after closing the browser the pages outside whmcs don't remember the session until a whmcs page is viewed. My code is like this <?php require("whmcs/dbconnect.php"); // You may have to change the path here if ($_SESSION['uid']) { echo "<div id='slide'><iframe src='/addbanner/pdhgallery/'width='600' frameborder='0' scrolling='no'></iframe> </div> "; } else { ?> <p6><form method="post" action="http://www.pdhwebdevelopment.com/whmcs/dologin.php?goto=/index.php"> Email Address: <input type="text" name="username" size="30" /><br /> Password: <input type="password" name="password" size="20" /> <input type="submit" value="Login" /> <p> <input type="checkbox" name="rememberme"> Remember Me </p> </form> <a href="http://www.pdhwebdevelopment.com/whmcs/register.php">Click here to register with us</a> </p6> <? } ?> It only seems to pick the cookie up from whmcs pages and its just the remember me works fine untill they return. Thanks for your help I'm quite new to whmcs and programming. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted September 25, 2014 Share Posted September 25, 2014 check if this may help you achieve what you need: http://docs.whmcs.com/AutoAuth 0 Quote Link to comment Share on other sites More sharing options...
Paul Haskett Posted September 25, 2014 Author Share Posted September 25, 2014 check if this may help you achieve what you need: http://docs.whmcs.com/AutoAuth Thanks for your reply. Had a look but not sure how to implement it to my site. If you could give me some idea or point me in the direction of a tutorial I would appreciate it. Thank you 0 Quote Link to comment Share on other sites More sharing options...
Paul Haskett Posted September 25, 2014 Author Share Posted September 25, 2014 Thanks for your reply, I have read the link you gave but am still not sure what to do? All I need to do is detect the persistent cookie to set the user to logged in when first landing on my site. Thanks again for your help. 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.