Jump to content

login session from page outside whmcs


Paul Haskett

Recommended Posts

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.

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.

  • 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